Skip to content

Instantly share code, notes, and snippets.

View SpenserJ's full-sized avatar

Spenser Jones SpenserJ

View GitHub Profile
#! /bin/sh
### BEGIN INIT INFO
# Provides: php-fpm
# Required-Start: $remote_fs $network
# Required-Stop: $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts php-fpm
# Description: starts the PHP FastCGI Process Manager daemon
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# 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: starts the nginx web server
# Description: starts nginx using start-stop-daemon
<link rel="stylesheet" media="only screen and (max-device-width: 1024px)" href="ipad.css" type="text/css" />
<link rel="stylesheet" media="only screen and (max-device-width: 480px)" href="iphone.css" type="text/css" />
<link rel="stylesheet" media="only screen and (-webkit-min-device-pixel-ratio: 2)" type="text/css" href="iphone4.css" />
@SpenserJ
SpenserJ / RushCommands.rb
Created July 26, 2010 21:21
~/.rush/commands.rb
def clear
50.times { puts "\n" }
end
def clean
if entries.length == 0 then return end
parent = entries[0].parent
parent['**/.DS_Store'].each { |f| f.destroy }
parent['**/Thumbs.db'].each { |f| f.destroy }
end
<!--
Vertically and horizontally center an image that is smaller than its container.
Container is positioned relative to its parent, as not to break formatting
Image is positioned absolutely (which is then relative to the container)
Image is set to left/top 50% of the container size, and then shifted left/up my negative margins of half the image's width/height
-->
<div style="width: 600px; height: 400px; border: 5px solid red; overflow: hidden; position: relative;">
<img src="http://www.wall.org/~larry/onion/square.gif" style="position: absolute; top: 50%; left: 50%; margin-top: -280px; margin-left: -400px;">
</div>