Skip to content

Instantly share code, notes, and snippets.

View johan--'s full-sized avatar

johan pretorius johan--

View GitHub Profile
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Temporary Workaround Concept for Facebook Bug 10005</title>
<!--
Temporary workaround concept for Facebook Bug 10005
http://bugs.developers.facebook.com/show_bug.cgi?id=10005
From your friends at http://awe.sm/
-->
@johan--
johan-- / tee.rb
Created July 16, 2010 08:22 — forked from rklemme/tee.rb
#!/usr/bin/env ruby19
require 'optparse'
# Report erros that are caused by invoking a method when
# an instance is not in the proper state to do so.
class StateError < Exception
end
# Instances of class Tee can send output to several destinations
class ApplicationController < ActionController::Base
include TwitterAuth::Helpers
helper :all
protect_from_forgery
rescue_from Twitter::Unauthorized, :with => :force_sign_in
private
def force_sign_in(exception)
#----------------------------------------------------------------------------
# Git Setup
#----------------------------------------------------------------------------
file '.gitignore', <<-FILE
.DS_Store
log/*.log
tmp/**/*
config/database.yml
db/*.sqlite3
public/uploads/*
@johan--
johan-- / gist:822536
Created February 11, 2011 15:54 — forked from bullrico/gist:51326
# Rails template - first pass
# Culled stuff from Peter Cooper, Jeremy McAnally
# Run it like this
# ruby ~/rails/dev/edge_rails/vendor/rails/railties/bin/rails my_new_app -m http://gist.github.com/51326.txt
# Link to local copy of edge rails
inside('vendor') { run 'ln -s /Users/bobby/rails/dev/edge_rails/vendor/rails rails' }
# Delete unnecessary files
# Delete unnecessary files
run "rm public/index.html"
run "rm public/favicon.ico"
run "rm public/images/rails.png"
run "rm public/javascripts/prototype.js"
run "rm public/javascripts/effects.js"
run "rm public/javascripts/dragdrop.js"
run "rm public/javascripts/controls.js"
# Copy database.yml for distribution use
# ignoring files
file ".gitignore", <<-TXT
log/*.log
tmp/**/*
db/*.sqlite3
.DS_Store
Thumbs.db
TXT
# download pt-br i18n and configure environment
#template
#Constants
app_name = `pwd`.split('/').last.strip
rails_version = '2.3.2'
jquery_version = '1.3.2'
##### remove files #################
run "rm README"
run "rm -rf test"
@johan--
johan-- / gist:822540
Created February 11, 2011 15:54 — forked from bigfleet/gist:51211
plugin 'rspec', :git => 'git://github.com/dchelimsky/rspec.git'
plugin 'rspec-rails', :git => 'git://github.com/dchelimsky/rspec-rails.git'
plugin 'restful-authentication', :git => 'git://github.com/technoweenie/restful-authentication.git'
plugin 'cucumber', :git => 'git://github.com/aslakhellesoy/cucumber.git'
plugin 'webrat', :git => 'git://github.com/brynary/webrat.git'
gem 'mislav-will_paginate', :lib => 'will_paginate', :source => 'http://gems.github.com'
rake("gems:install", :sudo => true)
#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db