Install Homebrew
http://mxcl.github.com/homebrew/
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
brew help
cd ~
mate .bashrc
Interim Note-Changes | |
.DS_Store |
var mongoose = require('./index') | |
, TempSchema = new mongoose.Schema({ | |
salutation: {type: String, enum: ['Mr.', 'Mrs.', 'Ms.']} | |
}); | |
var Temp = mongoose.model('Temp', TempSchema); | |
console.log(Temp.schema.path('salutation').enumValues); | |
var temp = new Temp(); | |
console.log(temp.schema.path('salutation').enumValues); |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
Install Homebrew
http://mxcl.github.com/homebrew/
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
brew help
cd ~
mate .bashrc
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
// MIT license | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
#!/usr/bin/env ruby | |
require "webrick" | |
=begin | |
WEBrick is a Ruby library that makes it easy to build an HTTP server with Ruby. | |
It comes with most installations of Ruby by default (it’s part of the standard library), | |
so you can usually create a basic web/HTTP server with only several lines of code. | |
The following code creates a generic WEBrick server on the local machine on port 1234, |
# Install linux update, followed by GCC and Make | |
sudo yum -y update | |
sudo yum install -y gcc make | |
# Install Nginx and PHP-FPM | |
sudo yum install -y nginx php-fpm | |
# Install PHP extensions | |
sudo yum install -y php-devel php-mysql php-pdo \ | |
php-pear php-mbstring php-cli php-odbc \ |
# Bash completion for Yeoman generators - tested in Ubuntu, OS X and Windows (using Git bash) | |
function _yo_generator_complete_() { | |
# local node_modules if present | |
local local_modules=$(if [ -d node_modules ]; then echo "node_modules:"; fi) | |
# node_modules in /usr/local/lib if present | |
local usr_local_modules=$(if [ -d /usr/local/lib/node_modules ]; then echo "/usr/local/lib/node_modules:"; fi) | |
# node_modules in user's Roaming/npm (Windows) if present | |
local win_roam_modules=$(if [ -d $(which yo)/../node_modules ]; then echo "$(which yo)/../node_modules:"; fi) | |
# concat and also add $NODE_PATH | |
local node_dirs="${local_modules}${usr_local_modules}${win_roam_modules}${NODE_PATH}" |
FROM ubuntu | |
MAINTAINER Eric Mill "[email protected]" | |
# turn on universe packages | |
RUN echo "deb http://archive.ubuntu.com/ubuntu raring main universe" > /etc/apt/sources.list | |
RUN apt-get update | |
# basics | |
RUN apt-get install -y nginx openssh-server git-core openssh-client curl | |
RUN apt-get install -y nano |