Skip to content

Instantly share code, notes, and snippets.

Avatar
🆒

Patrick Oscity padde

🆒
View GitHub Profile
View Elektrotechnik 2.1.c
# Patrick Oscity
#
# Bauhaus-Universität Weimar
# Fakultät Medien
# SoSe 2011
require 'rubygems'
require 'wavefile'
@padde
padde / pow_localhost.sh
Created Sep 12, 2011
Pow: Serve ~/Sites to localhost
View pow_localhost.sh
# public directory needed for static files!
cd ~/Sites
ln -s . public
# symlink as 'default' (magic name) into .pow
cd ~/.pow
ln -s ~/Sites default
# check if it works
open -a Safari http://localhost
@padde
padde / gist:1216920
Created Sep 14, 2011
Rails Helper for Typekit integration
View gist:1216920
def typekit_include_tag apikey
javascript_include_tag("http://use.typekit.com/#{apikey}.js") +
javascript_tag("try{Typekit.load()}catch(e){}")
end
@padde
padde / gist:1273601
Created Oct 9, 2011
Nginx init script
View gist:1273601
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
@padde
padde / gist:1273626
Created Oct 9, 2011
PHP FastCGI init script
View gist:1273626
#!/bin/bash
BIND=127.0.0.1:9000
USER=www-data
PHP_FCGI_CHILDREN=15
PHP_FCGI_MAX_REQUESTS=1000
PHP_CGI=/usr/bin/php-cgi
PHP_CGI_NAME=`basename $PHP_CGI`
#PHP_CGI_ARGS="- USER=$USER PATH=/usr/bin PHP_FCGI_CHILDREN=$PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=$PHP_FCGI_MAX_REQUESTS $PHP_CGI -b $BIND"
PHP_CGI_ARGS="- USER=$USER PATH=/usr/bin PHP_FCGI_MAX_REQUESTS=$PHP_FCGI_MAX_REQUESTS $PHP_CGI -b $BIND"
@padde
padde / setup-10-04.sh
Created Oct 9, 2011
Ubuntu 10.04 Server setup with Nginx, Passenger, Rails, PHP, Sqlite3, MySQL
View setup-10-04.sh
#! /bin/bash
function info {
echo -e "\e[0;32m---------------------------------------------------------"
echo -e $1
echo -e "---------------------------------------------------------\e[0m"
}
info "Update system"
apt-get update
@padde
padde / svg_builder.rb
Created Nov 2, 2011
Make SVG with builder
View svg_builder.rb
# encoding: utf-8
require 'rubygems'
require 'builder'
svg_doctype = [
:DOCTYPE,
:svg,
:PUBLIC,
"-//W3C//DTD SVG 1.1//EN",
@padde
padde / .gitignore
Created Nov 3, 2011
Basic .gitignore
View .gitignore
# generic
*~
*.lock
*.sw?
# OSX noise
.DS_Store
.localized
# WIN noise
@padde
padde / DefaultKeyBinding.dict
Created Nov 11, 2011
Disable non-breaking space (Alt+Space) on OS X
View DefaultKeyBinding.dict
# in ~/Library/KeyBindings/DefaultKeyBinding.dict
{
"~ " = ("insertText:", " ");
}
@padde
padde / .gitignore
Created Nov 16, 2011
XCode Noise .gitignore
View .gitignore
# xcode noise
build/*
*.perspective
*.perspectivev3
*.pbxuser
*.xcworkspace
*.mode1
*.mode2v3
*.mode1v3
xcuserdata