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
<input class="form-control typeahead" name="emails" type="text" | |
placeholder="emails" autocomplete="off" spellcheck="off" | |
data-source="emails"/> |
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
if (Meteor.isServer){ | |
Meteor.methods({ | |
emails: function(){ | |
return ['[email protected]']; | |
} | |
}); | |
} | |
if (Meteor.isClient){ | |
Template.demo.emails = function() { |
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
set root=%~dp0 | |
for /f %%i in ('dir . /b /ad') do ( | |
cd %root%%%i | |
if exist ".git" ( | |
git pull | |
) | |
if exist ".hg" ( | |
hg pull -u | |
) | |
) |
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
#!/bin/bash | |
# | |
# Watch current directory (recursively) for file changes, and execute | |
# a command when a file or directory is created, modified or deleted. | |
# | |
# Written by: Senko Rasic <[email protected]> | |
# | |
# Requires Linux, bash and inotifywait (from inotify-tools package). | |
# | |
# To avoid executing the command multiple times when a sequence of |
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
# Handlebars helpers | |
return if (typeof Handlebars == 'undefined') | |
Handlebars.registerHelper "timeago", (date) -> | |
return 'some time ago' if not date | |
dateObj = new Date(date) | |
return moment(dateObj).fromNow().replace(/\ /g, '\u00a0') | |
Handlebars.registerHelper "gravatar", (email, size) -> | |
Gravatar.imageUrl(email, {s: size}) |
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
// Using bin/typescript.js from TypeScript 0.9.7 | |
function compile(source) { | |
var parseErrors = []; | |
var logger = new TypeScript.NullLogger(); | |
var compilationSettings = TypeScript.ImmutableCompilationSettings.defaultSettings(); | |
var compiler = new TypeScript.TypeScriptCompiler(logger, compilationSettings); | |
var snapshot = TypeScript.ScriptSnapshot.fromString(source); |
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
# Add this line to your software sources | |
deb http://debian.meebey.net/experimental/mono / | |
sudo apt-get update | |
# of course, apt-get remove mono-complete first... | |
sudo apt-get install mono-complete | |
# I installed monodevelop from apt just to get all the prereqs | |
sudo apt-get install monodevelop |
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
<template name="prefetch"> | |
<div> | |
<h2>Prefetch</h2> | |
<div class="form-group"> | |
<input class="form-control typeahead" name="country" type="text" placeholder="Country" | |
autocomplete="off" spellcheck="off" data-source="/data/countries.json"/> | |
</div> | |
</div> | |
</template> |
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
private sealed class Router | |
{ | |
private readonly HttpContext _context; | |
private bool? _lastOp; | |
private bool _cumulativeResult; | |
public Router(HttpContext context) | |
{ | |
if (context == null) throw new ArgumentNullException("context"); |
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
# install tools | |
sudo apt-get install git python-software-properties pkg-config | |
sudo apt-get install gcc libc6-dev | |
sudo apt-get install mercurial | |
# install golang from source | |
hg clone -u release https://code.google.com/p/go | |
cd go/src | |
./all.bash |