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 | |
#chkconfig: 2345 80 05 | |
#description: Nginx | |
. /etc/rc.d/init.d/functions | |
INITLOG_ARGS="" | |
nginx=/usr/local/nginx/sbin/nginx | |
prog=nginx |
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
+ (BOOL)isConnectedToNetwork { | |
// Recover reachability flags | |
SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(kCFAllocatorSystemDefault, [@"twitter.com" UTF8String]); | |
SCNetworkReachabilityFlags flags; | |
BOOL didRetrieveFlags = SCNetworkReachabilityGetFlags(reachability, &flags); | |
CFRelease(reachability); | |
if (!didRetrieveFlags) { |
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
ActionView::Helpers::AssetTagHelper.register_javascript_expansion :jquery => ["http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"] | |
ActionView::Helpers::AssetTagHelper.register_javascript_expansion :jquery_ui => ["http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"] | |
ActionView::Helpers::AssetTagHelper.register_javascript_expansion :mootools => ["http://ajax.googleapis.com/ajax/libs/mootools/1.2.3/mootools-yui-compressed.js"] | |
ActionView::Helpers::AssetTagHelper.register_javascript_expansion :prototype => ["http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js"] | |
ActionView::Helpers::AssetTagHelper.register_javascript_expansion :scriptaculous => ["http://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.2/scriptaculous.js"] | |
ActionView::Helpers::AssetTagHelper.register_javascript_expansion :dojo => ["http://ajax.googleapis.com/ajax/libs/dojo/1.3.2/dojo/dojo.xd.js"] | |
ActionView::Helpers::AssetTagHelper.register_javascript_expansion :swfobject => ["http://ajax.googleapis.co |
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
module LayoutHelper | |
def title(page_title, show_title = true) | |
@content_for_title = page_title.to_s | |
@show_title = show_title | |
end | |
def show_title? | |
@show_title | |
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
// Simple reset | |
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td | |
margin: 0 | |
padding: 0 | |
border: 0 | |
outline: 0 | |
font-weight: inherit | |
font-style: inherit | |
font-size: 100% |
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 nginx; | |
worker_processes 5; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/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; | |
server_name example.com; | |
root /var/www/example.com/current/public; | |
passenger_enabled on; | |
location ~ "/{javascripts|stylesheets|images}/" { | |
expires 31d; | |
} | |
} |
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
ADT - America/Halifax - -10800 | |
CEST - Europe/Paris - 7200 | |
CDT - America/Chicago - -18000 | |
CDT - America/Chicago - -18000 | |
JST - Asia/Tokyo - 32400 | |
WEST - Europe/Lisbon - 3600 | |
MSD - Europe/Moscow - 14400 | |
EEST - Europe/Istanbul - 10800 | |
GST - Asia/Dubai - 14400 | |
COT - America/Bogota - -18000 |
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
export TERM=xterm-color | |
export GREP_OPTIONS='--color=auto' GREP_COLOR='1;32' | |
export CLICOLOR=1 | |
alias ls='ls -G' | |
export COLOR_NC='e[0m' # No Color | |
export COLOR_WHITE='e[1;37m' | |
export COLOR_BLACK='e[0;30m' | |
export COLOR_BLUE='e[0;34m' | |
export COLOR_LIGHT_BLUE='e[1;34m' | |
export COLOR_GREEN='e[0;32m' |
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 | |
# Install ImageMagick on Snow Leopard: by kain, improved by mislav and samsoffes | |
# http://www.icoretech.org/2009/08/install-imagemagick-in-leopard-snow-leopard/ | |
# Work with 64bit kernel mode | |
set -e | |
PREFIX=/usr/local | |
# Passenger users: amend your Apache global configuration with the following directive | |
# SetEnv PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin |