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 config --global core.editor "'C:\Program Files\Sublime Text 2\sublime_text.exe'" | |
# Check that it worked by listing all your config variables | |
git config --global -l |
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
/* | |
* Original Sample: http://craftycodeblog.com/2010/05/15/asp-net-mvc-render-partial-view-to-string/ | |
*/ | |
public class HomeController : Controller | |
{ | |
public ActionResult Index() | |
{ | |
string MyModelData = ""; |
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.registerHelper('trunc', function (context, options) { | |
var chars = options.hash.chars || 20; | |
var result = context; | |
if (context.length > chars) { | |
result = result.substring(0, chars); | |
if (options.hash.append) { | |
result += options.hash.append; |
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
public class WebApplication : System.Web.HttpApplication | |
{ | |
protected void Application_Start() | |
{ | |
RouteTable.Routes.MapRoute("HttpProxy", "proxy/{*path}", new { controller = "Proxy", action = "Http" }) | |
} | |
} |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_URI} !index | |
RewriteRule (.*) index.html [L] | |
</IfModule> |
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
// Execute this before an isotope call | |
// modified Isotope methods for gutters in masonryHorizontal | |
$.Isotope.prototype._getMasonryHorizontalGutterRows = function() { | |
var gutter = this.options.masonryHorizontal && this.options.masonryHorizontal.gutterWidth || 0; | |
containerHeight = this.element.height(); | |
this.masonryHorizontal.rowHeight = this.options.masonryHorizontal && this.options.masonryHorizontal.rowHeight || | |
// or use the size of the first item | |
this.$filteredAtoms.outerHeight(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
#brew update | |
Error: no such file to load -- tempfile | |
Please report this bug: | |
https://github.com/mxcl/homebrew/wiki/bug-fixing-checklist | |
/usr/local/Library/Homebrew/extend/pathname.rb:108:in `require' | |
/usr/local/Library/Homebrew/extend/pathname.rb:108:in `atomic_write' | |
/usr/local/Library/Homebrew/cmd/untap.rb:41:in `unlink_tap_formula' | |
/usr/local/Library/Homebrew/cmd/update.rb:32:in `update' | |
/usr/local/bin/brew:83:in `send' |
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
#! /usr/bin/env bash | |
i=0 | |
if [ ! -d "./images" ]; then | |
mkdir ./images | |
fi |
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
// Sync enemy positions; uses Underscore.js | |
_.each(data.enemies, function(e){ | |
var enemy = this.getEntityByRemoteName(e.remoteName); | |
// Reset the entities position | |
if(enemy) { | |
enemy.pos = e.pos; | |
} |
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
// Code injected into the Entity class | |
ig.Entity.inject({ | |
// Abstracting the controls | |
controls: { | |
up: false, | |
down: false, | |
left: false, | |
right: false | |
}, |