Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# ec2-run-instances --key build --user-data-file ec2-userdata.sh --group default --group basic ami-ed46a784
set -e -x
export DEBIAN_FRONTEND=noninteractive
apt-get update && apt-get upgrade -y
# ruby
wget http://rubyforge.org/frs/download.php/58679/ruby-enterprise_1.8.6-20090610_i386.deb
@hfase01
hfase01 / hfase.js
Created April 17, 2012 11:22
hfase.com balls logo
// animation globals
var t=0;
var frameInterval = 25; // in ms
var canvas = null; // canvas DOM object
var context = null; // canvas context
// ball globals
var ballRadius = 10;
// physics globals
var collisionDamper = 0.35;
var floorFriction = 0.0039 * frameInterval;
@hfase01
hfase01 / rc.local
Created April 20, 2012 23:08
This is an example rc.local file used to start Memcached
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
@hfase01
hfase01 / nginx.conf
Created May 21, 2012 12:58
nginx diaspora
user www-data;
worker_processes 8;
pid /var/run/nginx.pid;
events {
worker_connections 2048;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
@hfase01
hfase01 / 1337.sh
Created June 3, 2012 05:46
diaspora thin-sock init script conf and installer.
#!/bin/sh -e
set -o verbose
cd /etc/init.d
sudo rm -rf ./diaspora* ## WARNING! I need to change this to an IF condition to back up any files already there..
sudo wget https://raw.github.com/gist/2862098/diaspora
sudo chmod +x diaspora
sudo update-rc.d diaspora defaults
cd ~/
curl https://raw.github.com/gist/2862098/newD.sh | sh
cd /etc/nginx
<!DOCTYPE html>
<html dir='ltr' lang='en'>
<head>
<meta charset='utf-8'>
<meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible'>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<meta content='Diaspora*' name='description'>
<meta content='Diaspora, Inc.' name='author'>
<meta content='True' name='HandheldFriendly'>
<meta content='320' name='MobileOptimized'>
-# Copyright (c) 2010-2011, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
!!!
%html{:lang => I18n.locale.to_s, :dir => (rtl?) ? 'rtl' : 'ltr'}
%head
%meta{:charset => 'utf-8'}
%meta{'http-equiv' => 'X-UA-Compatible', :content => 'IE=edge,chrome=1'}
%meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}
@hfase01
hfase01 / _show.html.haml
Created June 23, 2012 07:51
Diaspora HAML landing page.
.navbar.navbar-fixed-top
.navbar-inner
.container-fluid
%a.btn.btn-navbar{"data-target" => ".nav-collapse", "data-toggle" => "collapse"}
%span.icon-bar
%span.icon-bar
%span.icon-bar
%a.btn.btn-success.pull-left{:href => "/users/sign_in"} Login
%a.brand{:href => "/"} hfase.com
.nav-collapse
.navbar.navbar-fixed-top
.navbar-inner
.container
%a.btn.btn-navbar{"data-target" => ".nav-collapse", "data-toggle" => "collapse"}
%span.icon-bar
%span.icon-bar
%span.icon-bar
%a.brand{:href => "#"} Project name
.nav-collapse
%ul.nav
@hfase01
hfase01 / diaspora
Created July 30, 2012 05:17
Diaspora Apache Passenger config
<VirtualHost *:80>
ServerName www.yourhost.com
# !!! Be sure to point DocumentRoot to 'public'!
DocumentRoot /somewhere/public
<Directory /somewhere/public>
# This relaxes Apache security settings.
AllowOverride all
# MultiViews must be turned off.
Options -MultiViews
</Directory>