This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mark@silicon:~$ sudo pip install blinkstick | |
Downloading/unpacking blinkstick | |
Downloading BlinkStick-0.7.0.tar.gz | |
Running setup.py egg_info for package blinkstick | |
Downloading/unpacking grapefruit==0.1a3 (from blinkstick) | |
You are installing an externally hosted file. Future versions of pip will default to disallowing externally hosted files. | |
You are installing a potentially insecure and unverifiable file. Future versions of pip will default to disallowing insecure files. | |
Downloading grapefruit-0.1a3.tar.gz (194kB): 194kB downloaded | |
Running setup.py egg_info for package grapefruit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Function for determining current git branch (if any) | |
# Gracefully fails if not in a git repo and returns nothing. | |
__gitBranch() { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
echo ${ref#refs/heads/} | |
} | |
# Retrieves status information for git and places into predefined variables. | |
__gitStatus() { | |
# Initialise git status variables |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mklink /D ".\WindowsPowershell" ".\My Dropbox\PowershellProfile" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Gets all items more expensive than £5. | |
var q = mongoContext.Query<Item>() | |
.Where(x => x.Price) | |
.IsGreaterThan(5); | |
// Gets all Smiths in the given cities. | |
var q2 = mongoContext.Query<Customer>() | |
.Where(x => x.Name).IsEqualTo("Smith") | |
.Where(x => x.City).IsIn("Bournemouth","Farnborough","London"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Start the MongoDB server running (foreground) | |
function Start-MongoD { | |
$dropBox = (Resolve-Path '~\Documents\My Dropbox').Path | |
$mongoConfig = "$dropBox\Software\MongoDB\mongo.conf" | |
$mongoData = "$dropBox\Software\MongoDB\data\" | |
& $dropBox\Software\MongoDB\bin\mongod.exe --config "'$mongoConfig'" --dbpath "'$mongoData'" | |
} | |
# Start the MongoDB client app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Bb]in | |
[Oo]bj | |
*.suo | |
TestResult.xml | |
*.sln.cache | |
*.[Rr]e[Ss]harper.user | |
_ReSharper* | |
*.csproj.user |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This would (does) work in proper browsers. | |
jQuery(createElement('form')) | |
.attr({'method':'post','action':/*some url*/}) | |
.submit(); | |
// IE needs it to be attached to the document somewhere first before submission will work. :( | |
var f = jQuery(createElement('form')) | |
.attr({'method':'post','action':/*some url*/}); | |
jQuery('body').append(f); | |
f.submit(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main):004:0> require 'json' | |
=> true | |
irb(main):005:0> data = { "timestamp" => Time.new } | |
=> {"timestamp"=>2011-07-13 13:55:29 +0100} | |
irb(main):006:0> json = data.to_json | |
=> "{\"timestamp\":\"2011-07-13 13:55:29 +0100\"}" | |
irb(main):007:0> deserialised = JSON.parse json | |
=> {"timestamp"=>"2011-07-13 13:55:29 +0100"} | |
irb(main):008:0> deserialised["timestamp"].class | |
=> String |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Jsgauge 0.4.1 | |
* http://code.google.com/p/jsgauge/ | |
* | |
* Licensed under the MIT license: | |
* http://www.opensource.org/licenses/mit-license.php | |
* | |
* Tweaked by Mark Embling (http://markembling.info/) to use requestAnimationFrame instead of setTimeout. | |
*/ | |
/*jslint browser: true */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 'git status' alias function | |
function gs { | |
git status $args | |
} |
OlderNewer