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
# SUPER DARING APP TEMPLATE 1.0 | |
# By Peter Cooper | |
# Link to local copy of edge rails | |
inside('vendor') { run 'ln -s ~/dev/rails/rails rails' } | |
# Delete unnecessary files | |
run "rm README" | |
run "rm public/index.html" | |
run "rm public/favicon.ico" |
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
# NAME: recaptcha | |
# VERSION: 1.0 | |
# AUTHOR: Peter Cooper [ http://www.rubyinside.com/ github:peterc twitter:peterc ] | |
# DESCRIPTION: Sinatra plugin to provide CAPTCHA support through recaptcha.net | |
# COMPATIBILITY: 0.3.2 /and/ latest rtomayko Hoboken builds! | |
# LICENSE: Use for what you want, just don't claim full credit unless you make significant changes | |
# | |
# INSTRUCTIONS: | |
# 0. Check out an extended client code example at the footer of this file | |
# 1. Ensure _this_ file is lib/recaptcha.rb within your app's directory structure |
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
# NAME: initializer | |
# VERSION: 1.0 | |
# AUTHOR: Peter Cooper [ http://www.rubyinside.com/ github:peterc twitter:peterc ] | |
# DESCRIPTION: Sinatra library to perform initialization functions - oriented around DataMapper use | |
# COMPATIBILITY: All, in theory - tested on Hoboken | |
# LICENSE: Use for what you want | |
# | |
# INSTRUCTIONS: | |
# 1. Ensure _this_ file is lib/initializer.rb within your app's directory structure | |
# 2. Read through and customize this file to your taste and your app's requirements |
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
# NAME: configurator | |
# VERSION: 1.0 | |
# AUTHOR: Peter Cooper [ http://www.rubyinside.com/ github:peterc twitter:peterc ] | |
# DESCRIPTION: Sinatra library to load app-wide configurations | |
# COMPATIBILITY: All, in theory - tested on Hoboken | |
# LICENSE: Use for what you want | |
# | |
# INSTRUCTIONS: | |
# 1. Ensure _this_ file is lib/initializer.rb within your app's directory structure | |
# 2. Add require 'lib/configurator' to your Sinatra app |
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
# NAME: authinabox | |
# VERSION: 1.01 (Dec 27, 2008) | |
# AUTHOR: Peter Cooper [ http://www.rubyinside.com/ github:peterc twitter:peterc ] | |
# DESCRIPTION: An "all in one" Sinatra library containing a User model and authentication | |
# system for both session-based logins OR HTTP Basic auth (for APIs, etc). | |
# This is an "all in one" system so you will probably need to heavily tailor | |
# it to your own ideas, but it will work "out of the box" as-is. | |
# COMPATIBILITY: - Tested on 0.3.2 AND the latest rtomayko Hoboken build! (recommended for the latter though) | |
# - NEEDS DataMapper! | |
# - Less work needed if you use initializer library -- http://gist.github.com/40238 |
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
# Script to generate a CSV of all your Twitter followers screen_name, name, url, and description (bio) | |
# Runs fine on OS X: put into a file, and then from a Terminal: ruby whatever.rb to run. | |
require 'json' | |
puts "Enter your Twitter username:" | |
username = gets.chomp | |
puts "Enter your Twitter password:" | |
password = gets.chomp | |
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 | |
# | |
# memcached This shell script takes care of starting and stopping | |
# standalone memcached. | |
# | |
# chkconfig: - 80 12 | |
# description: memcached is a high-performance, distributed memory | |
# object caching system, generic in nature, but | |
# intended for use in speeding up dynamic web | |
# applications by alleviating database load. |
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/perl -w | |
# start-memcached | |
# 2003/2004 - Jay Bonci <[email protected]> | |
# This script handles the parsing of the /etc/memcached.conf file | |
# and was originally created for the Debian distribution. | |
# Anyone may use this little script under the same terms as | |
# memcached itself. | |
use strict; |
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
SINATRA 0.9.x on DREAMHOST (using Rack 0.4) EXPERIMENT | |
File structure is: | |
/home/example.com/config.ru | |
/home/example.com/myapp.rb | |
/home/example.com/public | |
/home/example.com/tmp | |
/home/example.com/vendor/sinatra (with git clone of edge sinatra) |
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
global | |
maxconn 1024 | |
chroot /var/lib/haproxy | |
user haproxy | |
group haproxy | |
daemon | |
#debug | |
quiet | |
defaults |
OlderNewer