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
# first install pgsql with home brew | |
brew install postgresql | |
# at this point, you need to be sure you have /usr/local/bin before /usr/bin on your $PATH | |
# to see, run: | |
brew doctor | |
# if doctor does not complain about this issue you can pass this step. | |
# prepend /usr/local/bin to your PATH in your ~/.bash_profile |
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
nginx_version = "1.2.6" | |
download_url = "http://nginx.org/download/nginx-#{nginx_version}.tar.gz" | |
file_path = "#{Chef::Config[:file_cache_path]}/nginx-#{nginx_version}.tar.gz" | |
remote_file file_path do | |
owner "root" | |
group "root" | |
mode 00644 |
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
#!/bin/bash -xe | |
#THIS SCRIPT MUST BE RUN AS ROOT | |
#configure SSH | |
SSH_KEY="ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAuwaDITgrsmxVvSJ+HEir4iW2eBb8XqB3wIxCWJwmhiB2S6MkdX1CFcj8boHL2RIYgKN0yiTCVlOdQFjhyRpnd8NbS0RW7753SE1hzkgOg+2e1B15lf1PCSD5OPWAtpb1eYlLcs6hns+yFhYCFeQrKLBL2/si8D8OcQcTR7BjjFQEWdhjl4cYiT68cr57yFT+c/f32ZTynEWukC2YIGMjJ1nACUOYF8CSp6RUrD2kY3C1Pb1Q5V3jwi0lhay4aF5AWp28hPVtYASBe2BrYXp8uErhnmWxgXNV19P0NSHE7TBXd9nXz/njI2SDP/p2N/vHquz/Ybxs4F+kGGXknUFitQ== [email protected]" | |
echo $SSH_KEY >> /home/ubuntu/.ssh/authorized_keys | |
#configure locale | |
echo "export LANGUAGE=en_AU.UTF-8" > /tmp/locale |
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
/** | |
* Module dependencies. | |
*/ | |
var express = require('express') | |
, routes = require('./routes') | |
, http = require('http'); | |
var app = express(); | |
var server = app.listen(3000); |
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
require "rubygems" | |
require "mechanize" | |
require "cgi" | |
require "csv" | |
require 'digest/sha1' | |
require "image_downloader" | |
class PhotoFetcher |
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
require "rubygems" | |
require "mechanize" | |
require "cgi" | |
require "csv" | |
require "active_record" | |
require "./lib/colorize_output" | |
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
-module(my_behaviour). | |
-export([behaviour_info/1]). | |
%% init/1, some_fun/0 and other/3 are now expected callbacks | |
behaviour_info(callbacks) -> [{init,1}, {some_fun, 0}, {other, 3}]; | |
behaviour_info(_) -> undefined. |
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
% compile it with 'erlc -make' | |
% then start shell with 'erl -pa ebin/' | |
{ | |
'src/*', | |
[ | |
debug_info, | |
{ i, "src" }, | |
{ i, "include" }, | |
{ outdir, "ebin" } |
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
% Module: binary_tree | |
% Exposes new binary tree syntax. | |
% | |
% Author: monkegjinni <[email protected]> | |
% | |
% Notices: | |
% !These is a very naive tree implementation. In Production do not use this. | |
% For more efficient and product ready tree implementation; you should check | |
% otp_src_R<version>B<revision>/lib/stdlib/src/gb_trees.erl . | |
% |
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
Show hidden characters
{ | |
"color_scheme": "Packages/Railscasts.tmTheme", | |
"font_size": 14.0, | |
// The number of spaces a tab is considered equal to | |
"tab_size": 2, | |
// Set to true to insert spaces when tab is pressed | |
"translate_tabs_to_spaces": true, |