This file contains 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
defaults write com.apple.mail UserHeaders {"Reply-To" = "user@host"; } |
This file contains 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
ext = (f) -> (e=/^.+\.([^.]+)$/.exec(f)) and e[1] |
This file contains 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
msiexec.exe APPLICATIONROOTDIRECTORY=C:\opt\nodejs /i node-v0.8.14-x64.msi |
This file contains 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
var GitHubApi = require("github"); |
This file contains 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 fm(d){return [d.getFullYear(), d.getMonth()+1, d.getDate()].join('-');} | |
function rn(a,d){var b=new Date();b.setDate(a.getDate()+d);var ds=[a,b].sort();return " pushed:["+fm(ds[0])+" TO "+fm(ds[1])+"]";} | |
function se(s,d){window.location="https://github.com/search?type=Repositories&q="+s+rn(new Date(),d);} |
This file contains 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
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | |
This file contains 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
using System.ComponentModel; | |
using System.Linq.Expressions; | |
using System; | |
using System.Reactive.Linq; | |
using System.Reactive; | |
namespace Foo | |
{ | |
public abstract class HasObservableProperties: INotifyPropertyChanged |
This file contains 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
# from http://www.physics.sfasu.edu/astro/color/spectra.html | |
def rgbFromWavelength(wl, gamma=0.8) | |
rgb=case wl | |
when (380..439); [-1.0*(wl-440.0)/(440.0-380.0), 0.0, 1.0] | |
when (440..489); [0.0, (wl-440.0)/(490.0-440.0), 1.0] | |
when (490..509); [0.0, 1.0, -1.0*(wl-510.0)/(510.0-490.0)] | |
when (510..579); [(wl-510.0)/(580.0-510.0), 1.0, 0.0] | |
when (580..644); [1.0, -1.0*(wl-645.0)/(645-580.0), 0.0] | |
when (645..780); [1.0, 0.0, 0.0]; |
This file contains 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
for r in `git branch -r | grep -v HEAD`; do b=${r#origin/}; git branch --track $b $r; done |
This file contains 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
// original from http://www.scottlogic.co.uk/blog/colin/2010/03/linq-to-visual-tree/ | |
using System; | |
using System.Linq; | |
using System.Collections.Generic; | |
using System.Windows; | |
using System.Windows.Media; | |
namespace LinqToVisualTree | |
{ |