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
### | |
# Custom tmux configuration cobbled together from google and trial & error | |
# by Eric Marden (xentek.net), heavily modified by David Rogers (@al-the-x). | |
## | |
# set the command prefix to match gnuscreen (i.e. CTRL+a) | |
set-option -g prefix C-a | |
# use the NEW prefix key to "send-prefix" instead of the default | |
unbind-key C-b; bind-key C-a send-prefix |
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() { | |
// good opportunity to combine into a single statement | |
// qq w cw <esc> A, <esc> 0 j q | |
var a = 10; | |
var b = 20; | |
var c = 30; | |
var d = 40; | |
var e = 50; | |
// opportunity to simplify syntax |
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
<?php | |
/* | |
Plugin Name: Flxmap No Rocketscript | |
Plugin URI: https://gist.github.com/webaware/8949605 | |
Description: stop CloudFlare Rockscript messing up the map plugin! | |
Version: 3 | |
Author: WebAware | |
Author URI: http://webaware.com.au/ | |
@ref: http://wordpress.org/support/topic/map-wont-appear |
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
<?php | |
/** | |
* A "functional" test is typically one that runs the full application through it's | |
* paces: constructing a request, triggering a route, generating a response, and | |
* testing the fully rendered output. This abstract class provides some assertions | |
* appropriate for testing requests and responses and abstract methods for actually | |
* fetching requests and responses and routing the application. The developer should | |
* extend this class for his or her specific framework or application. | |
*/ |
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
var assert = require('assert'); | |
function test(actual, expected, success){ | |
success = success || 'pass!'; | |
assert.equal(actual, expected); | |
console.log(success); | |
} |
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
{ | |
"scripts": { | |
"postinstall": "./node_modules/.bin/wiredep -s index.html" | |
} | |
} |
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
def coalesce(*args): | |
return next((a for a in args if a is not None), None) | |
class Game(dict): | |
_xmin = _xmax = _ymin = _ymax = None | |
@property | |
def bounds(self): | |
""" | |
>>> Game((0,0)).bounds |
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
/* | |
Takes you from a Github Repo URL to the GH Pages version on github.io | |
*/ | |
javascript: (function() { | |
var s = location.href; | |
var r = /^((http[s]?|ftp):\/)?\/?([^:\/\s]+)((\/\w+)*\/)([\w\-\.]+[^#?\s]+)(.*)?(#[\w\-]+)?$/g; | |
location.href = s.replace(r, "http:/$5.github.io/$6"); | |
})(); | |
// URL Encoded Version (for use as a bookmarklet) |
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
alias updatechrome='source ~/chrome-awards' | |
alias chrome='/usr/bin/open -a "/Applications/Google Chrome.app"' | |
googlethat() { | |
chrome 'http://google.com?q='$1 | |
} | |
alias themoreyouknow="chrome 'http://ak-hdl.buzzfed.com/static/2015-02/1/20/enhanced/webdr02/anigif_enhanced-buzz-20392-1422840785-34.gif'" |
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
var expect = require('chai').expect; | |
/** | |
* write a function `max` that takes two `Numbers` as arguments | |
* and returns the largest of them. HINT: Use `if-else`...! | |
*/ | |
it('should calculate the max of two Number', function(){ | |
// expect(max(1,3)).to.be.equal(3); | |
expect(max(2,4)).to.be.equal(4); | |
expect(max(2,6)).to.be.equal(6); |
OlderNewer