Kind of continue from the other gist how to install LAMP on an Amazon AMI
##Install git
sudo yum install git-core
##Create ssh directory since it doesn't exists by default on the Amazon AMI
#!/bin/bash | |
# | |
# DESCRIPTION: | |
# | |
# Set the bash prompt according to: | |
# * the branch/status of the current git repository | |
# * the branch of the current subversion repository | |
# * the return value of the previous command | |
# | |
# USAGE: |
var BaseObject = { | |
create: function create() { | |
var instance = Object.create(this); | |
instance._construct.apply(instance, arguments); | |
return instance; | |
}, | |
extend: function extend(properties, propertyDescriptors) { | |
propertyDescriptors = propertyDescriptors || {}; |
Drop in replace functions for setTimeout() & setInterval() that | |
make use of requestAnimationFrame() for performance where available | |
http://www.joelambert.co.uk | |
Copyright 2011, Joe Lambert. | |
Free to use under the MIT license. | |
http://www.opensource.org/licenses/mit-license.php |
Kind of continue from the other gist how to install LAMP on an Amazon AMI
##Install git
sudo yum install git-core
##Create ssh directory since it doesn't exists by default on the Amazon AMI
Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications
like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html
#!/bin/bash | |
# | |
# DESCRIPTION: | |
# | |
# Set the bash prompt according to: | |
# * the active virtualenv | |
# * the branch/status of the current git repository | |
# * the return value of the previous command | |
# * the fact you just came from Windows and are used to having newlines in | |
# your prompts. |
if ($request_uri = /) { | |
set $test A; | |
} | |
if ($host ~* teambox.com) { | |
set $test "${test}B"; | |
} | |
if ($http_cookie !~* "auth_token") { | |
set $test "${test}C"; |
#!/usr/bin/env ruby | |
# This pre-commit hook will prevent any commit to forbidden branches | |
# (by default, "staging" and "production"). | |
# Put this file in your local repo, in the .git/hooks folder | |
# and make sure it is executable. | |
# The name of the file *must* be "pre-commit" for Git to pick it up. | |
FORBIDDEN_BRANCHES = ["staging", "production"] |
// node: | |
var moment = require('moment'); | |
moment().add('days', 2).fromNow(); | |
// 'in 2 days' | |
moment().subtract('days', 2).fromNow(); | |
// '2 days ago' | |
moment('November 1977').fromNow() |