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
ssh_user = "[email protected]" # for rsync deployment | |
remote_root = "~/path/to/remote/" # for rsync deployment | |
namespace :styles do | |
desc "Clear styles" | |
task :clear do | |
puts "*** Clearing styles ***" | |
system "rm -Rfv css/*" | |
end | |
desc "Generate styles" |
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
# Helps you migrate from attachment_fu | |
# put it in your /lib dir and include it your xxxx_uploader.rb | |
module UploaderFu | |
def partition_dir | |
("%08d" % model.id).scan(/\d{4}/).join("/") | |
end | |
def model_dir | |
"#{model.class.to_s.underscore}/#{mounted_as}/" |
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
---------- Forwarded message ---------- | |
From: Mark S. Miller <[email protected]> | |
Date: Tue, Nov 16, 2010 at 3:44 PM | |
Subject: "Future of Javascript" doc from our internal "JavaScript Summit" | |
last week | |
To: [email protected] | |
On November 10th and 11th, a number of Google teams representing a variety | |
of viewpoints on client-side languages met to agree on a common vision for | |
the future of Javascript. |
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
set daemon 30 # with start delay 30 | |
set mailserver localhost # sudo apt-get install postfix | |
set mail-format { from: [email protected] } | |
set alert [email protected] | |
set logfile /var/log/monit.log | |
check process redis-server with pidfile /var/run/redis.pid | |
start program = "/usr/local/bin/redis-server /data/redis/redis.conf" | |
stop program = "/usr/bin/killall -9 redis-server" | |
if totalmem is greater than 500.0 MB for 5 cycles then alert | |
if cpu is greater than 80% for 5 cycles then alert |
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
check host juggernaut with address 127.0.0.1 | |
start program = "/bin/bash -c '2>&1 1>>/home/deploy/juggernaut.log /usr/local/bin/node /usr/local/lib/node_modules/juggernaut/server.js'" | |
stop program = "/bin/kill -9 $(pidof node);/bin/kill -9 $(pgrep -f 'bash -c 2>&1 1>>/home/deploy/juggernaut.log')" | |
if failed port 8080 protocol HTTP | |
request /application.js | |
with timeout 10 seconds | |
then restart |
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
# Author: Pieter Noordhuis | |
# Description: Simple demo to showcase Redis PubSub with EventMachine | |
# | |
# Update 7 Oct 2010: | |
# - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
# the WebSocket protocol implementation in the cramp gem does not work | |
# well with Chrome's (newer) WebSocket implementation. | |
# | |
# Requirements: | |
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
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: $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 |
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
fastcgi_param QUERY_STRING $query_string; | |
fastcgi_param REQUEST_METHOD $request_method; | |
fastcgi_param CONTENT_TYPE $content_type; | |
fastcgi_param CONTENT_LENGTH $content_length; | |
fastcgi_param SCRIPT_NAME $fastcgi_script_name; | |
fastcgi_param REQUEST_URI $request_uri; | |
fastcgi_param DOCUMENT_URI $document_uri; | |
fastcgi_param DOCUMENT_ROOT $document_root; | |
fastcgi_param SERVER_PROTOCOL $server_protocol; |
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
#!/usr/bin/env python | |
# -*- coding: UTF-8 -*- | |
''' | |
@package smi2srt | |
@brief this module is for convert .smi subtitle file into .srt subtitle | |
(Request by Alfred Chae) | |
Started : 2011/08/08 | |
license: GPL |
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
## Prepare ################################################################### | |
# Remove RVM | |
rvm implode | |
# Ensure your homebrew is working properly and up to date | |
brew doctor | |
brew update | |
## Install ################################################################### |
OlderNewer