This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;;;;;;;;;;;;;;;;;;; | |
; FPM Configuration ; | |
;;;;;;;;;;;;;;;;;;;;; | |
; All relative paths in this configuration file are relative to PHP's install | |
; prefix (@prefix@). This prefix can be dynamicaly changed by using the | |
; '-p' argument from the command line. | |
; Include one or more files. If glob(3) exists, it is used to include a bunch of | |
; files from a glob(3) pattern. This directive can be used everywhere in the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user www; | |
worker_processes 4; | |
events { | |
worker_connections 8192; | |
use epoll; | |
} | |
pid /var/run/nginx.pid; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80 default; | |
#listen 443 ssl; | |
server_name domain.com; | |
#ssl_certificate /usr/local/nginx/certs/domain.com.pem; | |
#ssl_certificate_key /usr/local/nginx/certs/domain.com.key; | |
access_log /var/log/nginx/domain.com/access.log; | |
error_log /var/log/nginx/domain.com/error.log; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -ex | |
# Paste this into ssh | |
# curl -sL https://gist.github.com/gists/5001775/download | tar -xzO | /bin/bash -ex | |
# When forking, you can get the URL from the download button. | |
pushd $HOME | |
aptget='sudo apt-get' | |
chsh='sudo chsh' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html><head></head><body> <script>window.parent['slat_progress'](0.02);</script> <script type='text/javascript'> window.parent['slat_process']({"playlistId":"all","requestTime":1371876305930000,"differentialUpdate":false,"playlist":[{"genre":"Rock","beatsPerMinute":0,"albumArtistNorm":"","artistNorm":"12 stones","album":"Anthem for the Underdog","lastPlayed":1369837737172103,"artistImageBaseUrl":"//lh5.googleusercontent.com/p6Y0psxJXgsh9q1i3gm8ZdzVt5xMi88VIc9ZN90-qrCQLV2IWERWz8yl9lZAYOfgXJ8MihD0ig","type":6,"recentTimestamp":1369837737171000,"disc":0,"id":"b1720aa0-8338-3e3a-a0c2-6e592f396e29","composer":"","title":"Broken Road","albumArtist":"","artistMatchedId":"Akwbphhnp44mrdrxdkplduhff4a","totalTracks":0,"subjectToCuration":false,"name":"Broken Road","totalDiscs":0,"year":0,"titleNorm":"broken road","artist":"12 Stones","albumNorm":"anthem for the underdog","track":3,"origin":[],"durationMillis":240664,"matchedId":"Tg7uhlhcby3oh3gt7g5bkm72dca","albumArtUrl":"//lh5.googleusercontent.com/MmSfVM8FZe6cAHzf4BR |
OlderNewer