├── .gitattributes ├── screenshot.png ├── .nuget ├── NuGet.exe ├── NuGet.Config └── NuGet.targets ├── ClickOnce ├── setup.exe ├── Application Files │ └── GistInTime_1_0_0_9 │ │ ├── cloud.ico.deploy │ │ ├── GistInTime.exe.deploy │ │ ├── WpfControls.dll.deploy │ │ ├── MahApps.Metro.dll.deploy │ │ ├── System.Windows.Interactivity.dll.deploy │ │ ├── GistInTime.exe.config.deploy │ │ ├── GistInTime.application │ │ └── GistInTime.exe.manifest ├── GistInTime.application └── publish.htm ├── GistInTime ├── cloud.ico ├── GitHub-Mark-32px.png ├── GistInTime_TemporaryKey.pfx ├── Resources │ └── GitHub-Mark-32px.png ├── packages.config ├── App.xaml ├── Model │ ├── App.cs │ ├── File.cs │ ├── AuthorizationRequest.cs │ ├── AuthorizationResponse.cs │ ├── User.cs │ ├── GistsResponse.cs │ └── GithubScope.cs ├── Helpers │ ├── HotKeyWinApi.cs │ ├── ContextMenuExtensions.cs │ ├── GistSuggestionProvider.cs │ ├── Json.cs │ └── HotKey.cs ├── Properties │ ├── Settings.settings │ ├── AssemblyInfo.cs │ ├── Settings.Designer.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── App.config ├── SettingsDialog.xaml ├── MainWindow.xaml ├── SettingsDialog.xaml.cs ├── MainWindow.xaml.cs ├── Data │ └── GitHubApi.cs ├── GistInTime.csproj └── App.xaml.cs ├── screenshot-login.png ├── Libraries └── WpfControls.dll ├── GistInTime.sln ├── README.md └── .gitignore /.gitattributes: -------------------------------------------------------------------------------- 1 | # Disable LF normalization for all files 2 | * -text -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gotdibbs/GistInTime/HEAD/screenshot.png -------------------------------------------------------------------------------- /.nuget/NuGet.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gotdibbs/GistInTime/HEAD/.nuget/NuGet.exe -------------------------------------------------------------------------------- /ClickOnce/setup.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gotdibbs/GistInTime/HEAD/ClickOnce/setup.exe -------------------------------------------------------------------------------- /GistInTime/cloud.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gotdibbs/GistInTime/HEAD/GistInTime/cloud.ico -------------------------------------------------------------------------------- /screenshot-login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gotdibbs/GistInTime/HEAD/screenshot-login.png -------------------------------------------------------------------------------- /Libraries/WpfControls.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gotdibbs/GistInTime/HEAD/Libraries/WpfControls.dll -------------------------------------------------------------------------------- /GistInTime/GitHub-Mark-32px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gotdibbs/GistInTime/HEAD/GistInTime/GitHub-Mark-32px.png -------------------------------------------------------------------------------- /GistInTime/GistInTime_TemporaryKey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gotdibbs/GistInTime/HEAD/GistInTime/GistInTime_TemporaryKey.pfx -------------------------------------------------------------------------------- /GistInTime/Resources/GitHub-Mark-32px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gotdibbs/GistInTime/HEAD/GistInTime/Resources/GitHub-Mark-32px.png -------------------------------------------------------------------------------- /GistInTime/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /ClickOnce/Application Files/GistInTime_1_0_0_9/cloud.ico.deploy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gotdibbs/GistInTime/HEAD/ClickOnce/Application Files/GistInTime_1_0_0_9/cloud.ico.deploy -------------------------------------------------------------------------------- /ClickOnce/Application Files/GistInTime_1_0_0_9/GistInTime.exe.deploy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gotdibbs/GistInTime/HEAD/ClickOnce/Application Files/GistInTime_1_0_0_9/GistInTime.exe.deploy -------------------------------------------------------------------------------- /ClickOnce/Application Files/GistInTime_1_0_0_9/WpfControls.dll.deploy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gotdibbs/GistInTime/HEAD/ClickOnce/Application Files/GistInTime_1_0_0_9/WpfControls.dll.deploy -------------------------------------------------------------------------------- /ClickOnce/Application Files/GistInTime_1_0_0_9/MahApps.Metro.dll.deploy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gotdibbs/GistInTime/HEAD/ClickOnce/Application Files/GistInTime_1_0_0_9/MahApps.Metro.dll.deploy -------------------------------------------------------------------------------- /.nuget/NuGet.Config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ClickOnce/Application Files/GistInTime_1_0_0_9/System.Windows.Interactivity.dll.deploy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gotdibbs/GistInTime/HEAD/ClickOnce/Application Files/GistInTime_1_0_0_9/System.Windows.Interactivity.dll.deploy -------------------------------------------------------------------------------- /GistInTime/App.xaml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /GistInTime/Model/App.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace GistInTime.Model 8 | { 9 | public class App 10 | { 11 | public string url { get; set; } 12 | public string name { get; set; } 13 | public string client_id { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /GistInTime/Model/File.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace GistInTime.Model 8 | { 9 | public class File 10 | { 11 | public int size { get; set; } 12 | public string filename { get; set; } 13 | public string raw_url { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /GistInTime/Model/AuthorizationRequest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace GistInTime.Model 8 | { 9 | public class AuthorizationRequest 10 | { 11 | public List scopes { get; set; } 12 | public string client_id { get; set; } 13 | public string client_secret { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /GistInTime/Helpers/HotKeyWinApi.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | using System.Windows.Forms; 4 | using System.Windows.Input; 5 | 6 | internal class HotKeyWinApi 7 | { 8 | public const int WmHotKey = 0x0312; 9 | 10 | [DllImport("user32.dll", SetLastError = true)] 11 | public static extern bool RegisterHotKey(IntPtr hWnd, int id, ModifierKeys fsModifiers, Keys vk); 12 | 13 | [DllImport("user32.dll", SetLastError = true)] 14 | public static extern bool UnregisterHotKey(IntPtr hWnd, int id); 15 | } -------------------------------------------------------------------------------- /GistInTime/Model/AuthorizationResponse.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace GistInTime.Model 8 | { 9 | public class AuthorizationResponse 10 | { 11 | public int id { get; set; } 12 | public string url { get; set; } 13 | public List scopes { get; set; } 14 | public string token { get; set; } 15 | public App app { get; set; } 16 | public string note { get; set; } 17 | public string note_url { get; set; } 18 | public string updated_at { get; set; } 19 | public string created_at { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /GistInTime/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /GistInTime/Helpers/ContextMenuExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows.Forms; 7 | 8 | namespace GistInTime.Helpers 9 | { 10 | public static class ContextMenuExtensions 11 | { 12 | public static void AppendCommand(this ContextMenu cm, string displayName, EventHandler handler) 13 | { 14 | var command = new MenuItem(displayName, handler); 15 | cm.MenuItems.Add(command); 16 | } 17 | 18 | public static void AppendSeparator(this ContextMenu cm) 19 | { 20 | var separator = new MenuItem("-"); 21 | cm.MenuItems.Add(separator); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /GistInTime/Helpers/GistSuggestionProvider.cs: -------------------------------------------------------------------------------- 1 | using GistInTime.Model; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using WpfControls; 6 | 7 | namespace GistInTime.Helpers 8 | { 9 | public class GistSuggestionProvider : ISuggestionProvider 10 | { 11 | public IEnumerable GetSuggestions(string filter) 12 | { 13 | filter = filter.ToLower(); 14 | 15 | if (App.Gists == null || App.Gists.Count < 1) 16 | { 17 | return new List(); 18 | } 19 | 20 | var results = App.Gists 21 | .Where(x => x.description.ToLower().Contains(filter) || 22 | x.first_file_name.ToLower().Contains(filter) || 23 | (x.owner != null && x.owner.login.Contains(filter))) 24 | .OrderBy(x => x.description); 25 | 26 | return results; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /GistInTime/Model/User.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace GistInTime.Model 8 | { 9 | public class User 10 | { 11 | public string login { get; set; } 12 | public int id { get; set; } 13 | public string avatar_url { get; set; } 14 | public string gravatar_id { get; set; } 15 | public string url { get; set; } 16 | public string html_url { get; set; } 17 | public string followers_url { get; set; } 18 | public string following_url { get; set; } 19 | public string gists_url { get; set; } 20 | public string starred_url { get; set; } 21 | public string subscriptions_url { get; set; } 22 | public string organizations_url { get; set; } 23 | public string repos_url { get; set; } 24 | public string events_url { get; set; } 25 | public string received_events_url { get; set; } 26 | public string type { get; set; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /GistInTime/Helpers/Json.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Runtime.Serialization.Json; 4 | using System.Text; 5 | 6 | namespace GistInTime.Helpers 7 | { 8 | public class Json 9 | { 10 | public static T Deserialize(string json) 11 | { 12 | using (var memoryStream = new MemoryStream(Encoding.Unicode.GetBytes(json))) 13 | { 14 | var settings = new DataContractJsonSerializerSettings(); 15 | settings.UseSimpleDictionaryFormat = true; 16 | 17 | var serializer = new DataContractJsonSerializer(typeof(T), settings); 18 | 19 | T obj = (T)serializer.ReadObject(memoryStream); 20 | return obj; 21 | } 22 | } 23 | 24 | public static string Serialize(T obj) 25 | { 26 | var serializer = new DataContractJsonSerializer(typeof(T)); 27 | 28 | using (var ms = new MemoryStream()) 29 | { 30 | serializer.WriteObject(ms, obj); 31 | byte[] json = ms.ToArray(); 32 | return Encoding.UTF8.GetString(json, 0, json.Length); 33 | } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /GistInTime/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | False 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /ClickOnce/Application Files/GistInTime_1_0_0_9/GistInTime.exe.config.deploy: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | False 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /GistInTime.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2012 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GistInTime", "GistInTime\GistInTime.csproj", "{9D17515E-05AE-4213-9FFB-57BF3E304CD5}" 5 | EndProject 6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{9E4C93FF-7D40-4B9A-BE29-EDA37F1B9E96}" 7 | ProjectSection(SolutionItems) = preProject 8 | .nuget\NuGet.Config = .nuget\NuGet.Config 9 | .nuget\NuGet.exe = .nuget\NuGet.exe 10 | .nuget\NuGet.targets = .nuget\NuGet.targets 11 | EndProjectSection 12 | EndProject 13 | Global 14 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 15 | Debug|Any CPU = Debug|Any CPU 16 | Release|Any CPU = Release|Any CPU 17 | EndGlobalSection 18 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 19 | {9D17515E-05AE-4213-9FFB-57BF3E304CD5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 20 | {9D17515E-05AE-4213-9FFB-57BF3E304CD5}.Debug|Any CPU.Build.0 = Debug|Any CPU 21 | {9D17515E-05AE-4213-9FFB-57BF3E304CD5}.Release|Any CPU.ActiveCfg = Release|Any CPU 22 | {9D17515E-05AE-4213-9FFB-57BF3E304CD5}.Release|Any CPU.Build.0 = Release|Any CPU 23 | EndGlobalSection 24 | GlobalSection(SolutionProperties) = preSolution 25 | HideSolutionNode = FALSE 26 | EndGlobalSection 27 | EndGlobal 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | :no_entry: [NOT MAINTAINED] I no longer have use for this app and so my time and efforts have been refocused elsewhere. I'd be happy to transition this repo to someone else if desired, or accept pull requests as needed. Otherwise, this repo will be left active for historical purposes. 2 | 3 | GistInTime 4 | ========== 5 | 6 | Utility for Windows to quickly search for and copy the contents of one of your gists (or starred gists) to your clipboard. 7 | 8 | > 9 | ScreenShot 10 | 11 | Usage 12 | ---- 13 | 14 | 1. Press `[Ctrl] + [Windows Key] + [I]` to open the search box. 15 | 2. Search for your Gist based on one of the following: gist description, gist author, file name of first file in the gist. 16 | 3. Press `[Enter]` to copy the contents of your gist to the keyboard. The dialog will dismiss automagically. 17 | 18 | Setup 19 | ---- 20 | 21 | 1. [Install the ClickOnce app from here](https://raw.github.com/gotdibbs/GistInTime/master/ClickOnce/setup.exe) (or download, build and publish locally). 22 | 2. When the application launches, enter your GitHub username and password and click **Authenticate**. 23 | Note: this will only grab an authorization token, it will not store your username or password. 24 | 25 | > ScreenShot 26 | -------------------------------------------------------------------------------- /GistInTime/Model/GistsResponse.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace GistInTime.Model 9 | { 10 | public class GistsResponse 11 | { 12 | public string url { get; set; } 13 | public string forks_url { get; set; } 14 | public string commits_url { get; set; } 15 | public string id { get; set; } 16 | public string git_pull_url { get; set; } 17 | public string git_push_url { get; set; } 18 | public string html_url { get; set; } 19 | public Dictionary files { get; set; } 20 | public bool @public { get; set; } 21 | public string created_at { get; set; } 22 | public string updated_at { get; set; } 23 | public string description { get; set; } 24 | public int comments { get; set; } 25 | public User user { get; set; } 26 | public User owner { get; set; } 27 | public string comments_url { get; set; } 28 | 29 | [IgnoreDataMember] 30 | public DateTime updated_at_display 31 | { 32 | get 33 | { 34 | return DateTime.Parse(updated_at); 35 | } 36 | set { } 37 | } 38 | 39 | [IgnoreDataMember] 40 | public string first_file_name 41 | { 42 | get 43 | { 44 | var firstFile = files.FirstOrDefault(); 45 | if (!string.IsNullOrEmpty(firstFile.Key)) 46 | { 47 | return firstFile.Value.filename; 48 | } 49 | else 50 | { 51 | return "--"; 52 | } 53 | } 54 | set { } 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /GistInTime/Model/GithubScope.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace GistInTime.Model 3 | { 4 | public static class GithubScope 5 | { 6 | /// 7 | /// Read/write access to profile info only. Note: this scope includes user:email and user:follow. 8 | /// 9 | public const string User = "user"; 10 | /// 11 | /// Read access to a user’s email addresses. 12 | /// 13 | public const string UserEmail = "user:email"; 14 | /// 15 | /// Access to follow or unfollow other users. 16 | /// 17 | public const string UserFollow = "user:follow"; 18 | /// 19 | /// Read/write access to public repos and organizations. 20 | /// 21 | public const string PublicRepo = "public_repo"; 22 | /// 23 | /// Read/write access to public and private repos and organizations. 24 | /// 25 | public const string Repo = "repo"; 26 | /// 27 | /// Read/write access to public and private repository commit statuses. This scope is only 28 | /// necessary to grant other users or services access to private repository commit statuses 29 | /// without granting access to the code. The repo and public_repo scopes already include 30 | /// access to commit status for private and public repositories respectively. 31 | /// 32 | public const string RepoStatus = "repo:status"; 33 | /// 34 | /// Delete access to adminable repositories. 35 | /// 36 | public const string DeleteRepo = "delete_repo"; 37 | /// 38 | /// Read access to a user’s notifications. repo is accepted too. 39 | /// 40 | public const string Notifications = "notifications"; 41 | /// 42 | /// Write access to gists. 43 | /// 44 | public const string Gist = "gist"; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Build Folders (you can keep bin if you'd like, to store dlls and pdbs) 2 | [Bb]in/ 3 | [Oo]bj/ 4 | 5 | # mstest test results 6 | TestResults 7 | 8 | ## Ignore Visual Studio temporary files, build results, and 9 | ## files generated by popular Visual Studio add-ons. 10 | 11 | # User-specific files 12 | *.suo 13 | *.user 14 | *.sln.docstates 15 | 16 | # Build results 17 | [Dd]ebug/ 18 | [Rr]elease/ 19 | x64/ 20 | *_i.c 21 | *_p.c 22 | *.ilk 23 | *.meta 24 | *.obj 25 | *.pch 26 | *.pdb 27 | *.pgc 28 | *.pgd 29 | *.rsp 30 | *.sbr 31 | *.tlb 32 | *.tli 33 | *.tlh 34 | *.tmp 35 | *.log 36 | *.vspscc 37 | *.vssscc 38 | .builds 39 | 40 | # Visual C++ cache files 41 | ipch/ 42 | *.aps 43 | *.ncb 44 | *.opensdf 45 | *.sdf 46 | 47 | # Visual Studio profiler 48 | *.psess 49 | *.vsp 50 | *.vspx 51 | 52 | # Guidance Automation Toolkit 53 | *.gpState 54 | 55 | # ReSharper is a .NET coding add-in 56 | _ReSharper* 57 | 58 | # NCrunch 59 | *.ncrunch* 60 | .*crunch*.local.xml 61 | 62 | # Installshield output folder 63 | [Ee]xpress 64 | 65 | # DocProject is a documentation generator add-in 66 | DocProject/buildhelp/ 67 | DocProject/Help/*.HxT 68 | DocProject/Help/*.HxC 69 | DocProject/Help/*.hhc 70 | DocProject/Help/*.hhk 71 | DocProject/Help/*.hhp 72 | DocProject/Help/Html2 73 | DocProject/Help/html 74 | 75 | # Click-Once directory 76 | publish 77 | 78 | # Publish Web Output 79 | *.Publish.xml 80 | 81 | # NuGet Packages Directory 82 | packages 83 | 84 | # Windows Azure Build Output 85 | csx 86 | *.build.csdef 87 | 88 | # Windows Store app package directory 89 | AppPackages/ 90 | 91 | # Others 92 | [Bb]in 93 | [Oo]bj 94 | sql 95 | TestResults 96 | [Tt]est[Rr]esult* 97 | *.Cache 98 | ClientBin 99 | [Ss]tyle[Cc]op.* 100 | ~$* 101 | *.dbmdl 102 | Generated_Code #added for RIA/Silverlight projects 103 | 104 | # Backup & report files from converting an old project file to a newer 105 | # Visual Studio version. Backup files are not needed, because we have git ;-) 106 | _UpgradeReport_Files/ 107 | Backup*/ 108 | UpgradeLog*.XML 109 | -------------------------------------------------------------------------------- /GistInTime/SettingsDialog.xaml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |