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 --login | |
# | |
# Supervises unicorn; stopping this service prompts a graceful shutdown of the | |
# current unicorn instance. Sending HUP to this service causes unicorn to re-exec | |
# itself for upgrades etc. | |
# | |
function is_pid_running() { | |
set +e |
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
site :opscode | |
cookbook 'redisio' | |
cookbook 'git' | |
cookbook 'apt' | |
cookbook "runit", ">= 1.1.2" # HACK: force-use this version to use restart_on_update | |
cookbook 'rackbox' | |
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
<?php | |
class SimpleMath { | |
var $a; | |
var $b; | |
var $math; | |
public function add($a, $b){ | |
$math = $a + $b; | |
return $math; | |
} |
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
Gdn_MultiFileUpload.prototype.NewUploader = function() { | |
var NewUploaderID = null; var AutoShow = false; | |
if (this.CurrentInput == null) { | |
NewUploaderID = 1; | |
} else { | |
AutoShow = true; | |
NewUploaderID = parseInt(this.CurrentInput.split('_').pop()) + 1; | |
} | |
NewUploaderID = [this.AttachFileRootName,NewUploaderID].join('_'); |
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
sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config |
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
gzip on; | |
gzip_http_version 1.1; | |
gzip_vary on; | |
gzip_comp_level 6; | |
gzip_proxied any; | |
gzip_types text/plain text/html text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; | |
# make sure gzip does not lose large gzipped js or css files | |
# see http://blog.leetsoft.com/2007/7/25/nginx-gzip-ssl | |
gzip_buffers 16 8k; |