Skip to content

Instantly share code, notes, and snippets.

View ninjabiscuit's full-sized avatar

Andrew Walker ninjabiscuit

  • Intercom
  • London
View GitHub Profile
preexec () {
# Note the date when the command started, in unix time.
CMD_START_DATE=$(date +%s)
# Store the command that we're running.
CMD_NAME=$1
}
precmd () {
# Proceed only if we've ran a command in the current shell.
if ! [[ -z $CMD_START_DATE ]]; then
# Note current date in unix time
.block {
min-height:50px;
background:blue;
margin-bottom:1em;
}
@ninjabiscuit
ninjabiscuit / gist:9704570
Created March 22, 2014 10:27
Sir Trevor Image block with better upload errorreporting
/*
Simple Image Block
*/
SirTrevor.Blocks.Image = SirTrevor.Block.extend({
type: "image",
title: function() { return i18n.t('blocks:image:title'); },
droppable: true,

How to black tie

Jacket

  1. Peak lapel / shawl collar
  2. Cut away collar
  3. No vents
  4. Ticket pocket - at an angle
  5. Pocket square
  6. Absolutley no double breasted
@ninjabiscuit
ninjabiscuit / gist:2818107
Created May 28, 2012 09:20
Install all the things

###To generate SSH keys run:

ssh-keygen

(keep pressing enter till the notices go away)

Then you will have a private key. Next run

cat ~/.ssh/id_rsa.pub
<!doctype html>
<head>
<meta charset="utf-8">
</head>
<body>
</body>
</html>
if (typeof Object.create !== "function")
Object.create = function (o) {
function F() {}
F.prototype = o;
return new F();
};
var Model = {
prototype: {
init: function(){}
@ninjabiscuit
ninjabiscuit / database.yml
Created August 13, 2011 12:09
database.yml
login: &login
adapter: mysql2
host: localhost
username: root
password:
encoding: utf8
collation: utf8_general_ci
development: