Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Shaun Hannah hooptie45

🎯
Focusing
Block or report user

Report or block hooptie45

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View snippet.rb
require 'thor'
require 'active_support/inflector'
require 'thor/group'
module Update
module My
class Tasks < Thor
include Thor::Actions
desc "task", "Generate Base App"
def task
thor :update, "make.thor", "http://gist.github.com/623258"
View deploy.rb
load 'config/deploy/settings.rb'
load 'config/deploy/symlinks.rb'
load 'config/deploy/passenger.rb'
load 'config/deploy/callbacks.rb'
load 'config/deploy/maintenance.rb'
load 'config/deploy/git.rb'
View mini-irb.rb
%w{readline rubygems bond}.each {|e| require e }
Bond.start
history_file = File.join(ENV["HOME"], '.mini_irb_history')
IO.readlines(history_file).each {|e| Readline::HISTORY << e.chomp } if File.exists?(history_file)
while (input = Readline.readline('>> ', true)) != 'exit'
begin puts "=> #{eval(input).inspect}"; rescue Exception; puts "Error: #{$!}" end
end
File.open(history_file, 'w') {|f| f.write Readline::HISTORY.to_a.join("\n") }
@hooptie45
hooptie45 / LICENSE.txt
Created Jun 6, 2011 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
View gist:1076785
require 'flexgen/model_builder'
require 'metamodel/as'
include ASMetaModel
def auto_build
FlexGen::ModelBuilder.build(ASMetaModel) do
app "App", :base => "com.test" do
# Models
actor "Customer" do
attribute "first_name", :view_type => "String"
attribute "last_name", :view_type => "String"
View friend-buy.io
> SET server:name "bidja"
"OK"
> SADD item:item1:bidders 123456
true
> SADD item:item1:bidders 333333
true
> SADD item:item1:bidders 555555
true
> SADD item:item1:bidders 123456
true
View dsl.rb
app "App", :base => "com.test" do
# Models
actor "Customer" do
attribute "first_name", :view_type => "String"
attribute "last_name", :view_type => "String"
# Customer Signals
sig "New"
sig "Destroy"
end
View example_note_keeping_app.rb
require 'rubygems'
require 'sinatra'
require 'redis'
# To use, simply start your Redis server and boot this
# example app with:
# ruby example_note_keeping_app.rb
#
# Point your browser to http://localhost:4567 and enjoy!
#
@hooptie45
hooptie45 / rails31init.md
Created Oct 14, 2011 — forked from jraines/rails31init.md
Rails 3.1 with Rspec, Cucumber, Factory Girl, Haml, and Simple Form
View rails31init.md

Install Rails 3.1 RC

gem install rails --pre

generate new app, skipping Test::Unit file generation

rails new my_app -T

Set up Gemfile

View gist:2493539
class ActionDispatch::Routing::Mapper
def draw(routes_name)
instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb")))
end
end
BCX::Application.routes.draw do
draw :api
draw :account
draw :session
You can’t perform that action at this time.