Skip to content

Instantly share code, notes, and snippets.

@hfase01
hfase01 / _show.html.erb
Created September 25, 2012 04:30
New ERB Impress.js landing page for Diaspora* :b
<% content_for :head do %>
<meta property="og:title" content="<%= AppConfig[:pod_name] %>" />
<meta property="og:description" content="Diaspora*" />
<meta property="og:type" content="website" />
<meta property="og:url" content="<%= AppConfig[:pod_url] %>" />
<meta property="og:image" content="<%= AppConfig[:pod_url] %>/icon_128.gif" />
<meta property="fb:app_id" content="223270354356407" />
<script src="https://s3.amazonaws.com/hfase-assets/hfase.js" type="text/javascript"></script>
<link rel="canonical" href="https://hfase.com">
<script src="https://s3.amazonaws.com/hfase-assets/jquery-1.8.2.min.js" type="text/javascript"></script>
@hfase01
hfase01 / fastmono
Created September 24, 2012 11:45
You will need mono-fastcgi-server4 & libmono-microsoft-visualbasic10.0-cil
#!/bin/bash
### BEGIN INIT INFO
# Provides: fastmono
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Fast-cgi-mono.
# Description: Fast-cgi-mono mono-fastcgi-server4 startup script.
### END INIT INFO
@hfase01
hfase01 / fastmono
Created September 23, 2012 18:08
mono init.d
#!/bin/bash
### BEGIN INIT INFO
# Provides: fastmono
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Fast-cgi-mono.
# Description: Fast-cgi-mono mono-fastcgi-server4 startup script.
### END INIT INFO
@hfase01
hfase01 / ssh_config
Created September 23, 2012 17:37
This is the configuration to disable passwords and only use pub-key auth with Ubuntu SSH
# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.
# Configuration data is parsed as follows:
# 1. command line options
# 2. user-specific file
# 3. system-wide file
# Any configuration value is only changed the first time it is set.
@hfase01
hfase01 / node-and-npm-in-30-seconds.sh
Created September 18, 2012 13:31 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://npmjs.org/install.sh | sh
@hfase01
hfase01 / nginx.conf
Created September 13, 2012 07:10
my nginx vodo
worker_processes 8;
pid /var/run/nginx.pid;
events {
worker_connections 4096;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
@hfase01
hfase01 / my.conf
Created September 7, 2012 02:58
MySQL
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = -12
[mysqld]
user = mysql
@hfase01
hfase01 / node.sh
Last active January 2, 2021 14:32
Install nodejs from source
#!/bin/sh
#########
## This script simply installs Nodejs from source,
## eliminating the need for strange packaged versions.
##
## To run this script right from GitHub use the following command.
## (You will not see the password prompt at first though..)
##
## ~$ curl https://gist.githubusercontent.com/hfase01/3446929/raw/node.sh | sudo sh
##########
@hfase01
hfase01 / ruby.sh
Last active January 2, 2021 14:48
Installs ruby 1.9.3 from source instead of package or RVM.
#!/bin/sh
#########
## This script simply installs Ruby 1.9+ from source,
## eliminating the need for RVM or strange packaged versions.
##
## To run this script right from GitHub use the following command.
## **RUN THIS AS ROOT**
##
## ~$ curl https://gist.github.com/hfase01/3444584/raw/ruby.sh | sh
##########
@hfase01
hfase01 / startbox
Created August 24, 2012 01:28
vboxmanage init.d script
SERVICENAME=VirtualBox
VIRTUALMACHINE="Linux Server"
#echo "VirtualBox Virtual Machine details"
#echo "=================================="
#echo "VIRTUALMACHINE=$VIRTUALMACHINE"
VMSTATUS=`VBoxManage list runningvms | grep "$VIRTUALMACHINE" | wc -l`
PIDFILE="/var/run/$SERVICENAME-$VIRTUALMACHINE.pid"
# Check for missing binaries
VIRTUALBOX_BIN=/usr/bin/VBoxHeadless