Skip to content

Instantly share code, notes, and snippets.

@jjhamshaw
jjhamshaw / debug_output.ps1
Created March 26, 2012 18:03
powershell pscx module example: 'write-zip'
C:\Windows\System32\WindowsPowerShell\v1.0
ModuleType Name ExportedCommands
---------- ---- ----------------
Manifest AppLocker {}
Manifest BitsTransfer {}
Manifest PSDiagnostics {}
Manifest TroubleshootingPack {}
Manifest WebAdministration {}
@jjhamshaw
jjhamshaw / gist:1199032
Created September 6, 2011 21:31
example of a cucumber feature file
Feature: User accounts
Scenario: A user can log in to the site
Given: I am on the log in page
When: I fill in user details
And: click "Sign in"
Then: I should be redirected to the "my account" page
@jjhamshaw
jjhamshaw / AppCache.cs
Created April 22, 2015 02:11
A simple System.Runtime.Caching.MemoryCache wrapper
public class AppCache : ICache
{
public object GetValue(string key)
{
MemoryCache memoryCache = MemoryCache.Default;
return memoryCache.Get(key);
}
public bool Add(string key, object value, DateTimeOffset absExpiration)
{
[
{ "keys": ["ctrl+shift+l"], "command": "reveal_in_side_bar"},
// dependent on plugins
{ "keys": ["ctrl+k", "ctrl+f"], "command": "xml_prettify" }
]
@jjhamshaw
jjhamshaw / gist:8931729
Created February 11, 2014 09:25
remove deleted remote branches
# Option 1) remove deleted branches on fetch
git fetch --prune
# Option 2) create an alias. Open your config file...
git config -e
# ...and add the following section
[alias]