Skip to content

Instantly share code, notes, and snippets.

@camshaft
camshaft / MNMP.sh
Created June 9, 2011 04:04
Mac + Nginx + MongoDB + PHP
#!/bin/bash
# vars
PHP_VERSION="5.3.6"
NGINX_VERSION="1.0.4"
MONGO_VERSION="1.8.1"
MEMCACHED_VERSION="1.4.5"
DIRECTORY=$(cd `dirname $0` && pwd)
PHP_DIR=$DIRECTORY/lib/php/$PHP_VERSION/
@camshaft
camshaft / hosts
Created July 5, 2011 18:10
For a better internet experience
# This hosts file is brought to you by Dan Pollock and can be found at
# http://someonewhocares.org/hosts/
# You are free to copy and distribute this file, as long the original
# URL is included. See below for acknowledgements.
# Please forward any additions, corrections or comments by email to
# hosts@someonewhocares.org
# Last updated: Jul 4th, 2011 at 11:12
@camshaft
camshaft / php.rb
Created August 9, 2011 05:32
Brew PHP installer for BytheStack
require 'formula'
def mysql_installed?
`which mysql_config`.length > 0
end
class Php < Formula
url 'http://www.php.net/get/php-5.3.6.tar.gz/from/this/mirror'
homepage 'http://php.net/'
md5 '88a2b00047bc53afbbbdf10ebe28a57e'
@camshaft
camshaft / wscript
Created January 19, 2012 19:07
Closure wscript file
#!/usr/bin/env python
# encoding: utf-8
# Cameron Bytheway, 2011
import os
APPNAME = 'closure_app'
VERSION = '0.1'
top = '.'
@camshaft
camshaft / gist:1709042
Created January 31, 2012 05:29
Most complete hosts file
This file has been truncated, but you can view the full file.
# hosts.blc
# Liste anti-phishing sécurisant l'accès à 2671 sites commerciaux, financiers et sécuritaires
# © Airelle - http://rlwpx.free.fr/WPFF/hosts.htm - 04.12.2011
# Diffusion et utilisation libres sous réserve de conserver les commentaires
127.0.0.1 localhost
# Sites financiers
2.20.216.113 www.bancosantander.es
2.20.213.155 home.americanexpress.com
2.20.216.136 www.dbs.com
2.21.131.189 www.morganstanley.com
@camshaft
camshaft / apt-fast
Created March 23, 2012 05:04
Apt-fast auto configured
# !/bin/sh
# apt-fast v1.4 by Matt Parnell http://www.mattparnell.com, GNU GPLv3
# Use this just like apt-get for faster package downloading.
###################################################################
# CONFIGURATION OPTIONS #
###################################################################
# Maximum number of connections
_MAXNUM=10
@camshaft
camshaft / example-slide.html
Created June 25, 2012 20:52
Example presentation with reveal.js
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Nujii Studio</title>
<meta name="description" content="">
<meta name="author" content="Scott Wall">
@camshaft
camshaft / ember-data.js
Created July 14, 2012 19:04
Ember.js Data
(function() {
window.DS = Ember.Namespace.create({
CURRENT_API_REVISION: 4
});
})();
(function() {
@camshaft
camshaft / example.js
Created August 15, 2012 19:23
Parallel service request
function(req, res) {
var response = {};
var urls = ["http://test.com", "http://other.test.com"];
// Iterate the urls
services.forEach(function(service){
get(service, function(err, data){
// Handle error
if(err) res.render('error', err);
@camshaft
camshaft / angular.js
Created September 1, 2012 19:54
angular.js getter/setter
/**
* @license AngularJS v1.1.0-de024355
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, document, undefined) {
'use strict';
////////////////////////////////////