Skip to content

Instantly share code, notes, and snippets.

View al-the-x's full-sized avatar

David Rogers AKA "AL the X" al-the-x

View GitHub Profile

An often-referenced acronym for meeting agendas. I stole the idea for a gist from @aaronbuchanan, who cites Market Footprint (blog) as the original source.

  • Purpose: What is the purpose of the meeting?
  • Objective: What are you trying to achieve in the meeting, and what does success look like?
  • Structure: What is the structure of the meeting we are having?
  • Timing: How much time is allocated to the meeting?
@al-the-x
al-the-x / colorize-log.zsh
Created August 15, 2016 15:43
Colorize the output of any log with `ack` by piping to `colorize-log`
function colorize-log {
colorize red ERROR | \
colorize yellow 'WARN(ING)?' | \
colorize green INFO | \
colorize white DEBUG | \
colorize white TRACE
}
@al-the-x
al-the-x / rovarspraket.js
Created September 18, 2015 19:37
Coding Dojo @ TIY-Durham on 2015-09-18 with 2015-FALL-FEE!
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);
@rtablada
rtablada / .chrome-awards
Last active August 29, 2015 14:24
Opens specific sites in Chrome from the CLI
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'"
@timwco
timwco / ghregex.js
Last active December 9, 2016 20:52
Github to GH Pages to Github Bookmarklet
/*
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)
@al-the-x
al-the-x / conway.py
Created November 16, 2014 23:13
Implementation of Conway's Game of Life in Python for a potentially infinite board using the `doctest` module: `python -m doctest conway.py`
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
@al-the-x
al-the-x / .bowerrc
Last active August 29, 2015 14:08
Starting point for Coding Dojos in JavaScript using Mocha and Chai
{
"scripts": {
"postinstall": "./node_modules/.bin/wiredep -s index.html"
}
}
@al-the-x
al-the-x / check-writing.js
Created October 2, 2014 15:33
Practiced Kata: Check Writing from @TheIronYard--Orlando
var assert = require('assert');
function test(actual, expected, success){
success = success || 'pass!';
assert.equal(actual, expected);
console.log(success);
}
@al-the-x
al-the-x / FunctionalTestCase.php
Last active August 29, 2015 14:04
I get tired of writing this simple `FunctionalTestCase` over and over again. I should submit to @sbergmann for PHPUnit...
<?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.
*/
@webaware
webaware / flxmap-no-rocketscript.php
Last active January 31, 2020 16:29
stop CloudFlare Rockscript messing up WP Flexible Map plugin!
<?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