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 | |
VERSION="1.1" | |
REEV="http://rubyforge.org/frs/download.php/48623/ruby-enterprise-1.8.6-20081215.tar.gz" | |
REEF="ruby-enterprise-1.8.6-20081215.tar.gz" | |
REEFF=${REEF%".tar.gz"} | |
PASSENGER="2.0.6" | |
echo "#####################################" | |
echo "Welcome, let's get this party rollin'" | |
echo "#####################################" |
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 ruby | |
require 'rubygems' | |
require 'octopi' | |
require 'choice' | |
include Octopi | |
Choice.options do | |
header '' |
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
Rails CMS alternatives | |
====================== | |
Active projects: | |
--------------- | |
adva-cms | |
repo: http://github.com/svenfuchs/adva_cms/ | |
site: http://adva-cms.org/ | |
Last update: 11/24/09 | |
"the cutting edge Rails CMS platform" |
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
class Cart | |
include MongoMapper::Document | |
many :cart_items | |
timestamps! | |
def add_new_item_or_increase_quantity(product_id, quantity) | |
if self.has_product?(product_id) | |
self.increment_cart_item_quantity(product_id, quantity) | |
else |
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/ruby | |
require "rubygems" | |
require "mongo" | |
require "json/pure" | |
require "open-uri" | |
# db config | |
db = Mongo::Connection.new.db('friendfeed') | |
col = db.collection('lifesci') |
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": "NokiaN70", | |
"brand": "Nokia", | |
"model": "N70", | |
"user-agent": ["NokiaN70-1","NokiaN70-2","NokiaN70-3"], | |
"css": { | |
"css_supports_width_as_percentage": true | |
}, | |
"sms": { | |
"callericon": true, |
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
require 'rubygems' | |
require 'eventmachine' | |
require 'em-websocket' | |
require 'json' | |
class Connection | |
attr_accessor :socket, :user_id | |
def initialize(socket, user_id) | |
@socket = socket |
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
model_object.copy_to_db(CouchRest.database!("http://admin:[email protected]:5984/db") | |
# couchrest/document | |
def copy_to_db(db, bulk = false) | |
raise ArgumentError, "doc.database required to copy" unless db | |
#result = db.copy_doc(self, dest) | |
result = db.save_doc self, bulk | |
result['ok'] | |
end |
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
layout :layout_by_resource | |
theme :layout_by_resource | |
def layout_by_resource | |
if devise_controller? | |
if resource_name == :participant | |
if subdomain_conference && user_signed_in? | |
"conf_manage" | |
elsif subdomain_conference && participant_signed_in? | |
"conf_participant" |
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
Requirement already satisfied (use --upgrade to upgrade): zope.interface in ./ve/lib/python2.7/site-packages (from -r config/requirements.pip (line 1)) | |
Requirement already satisfied (use --upgrade to upgrade): carrot==0.10.4 in ./ve/lib/python2.7/site-packages (from -r config/requirements.pip (line 2)) | |
Requirement already satisfied (use --upgrade to upgrade): celery==1.0.6 in ./ve/lib/python2.7/site-packages (from -r config/requirements.pip (line 3)) | |
Requirement already satisfied (use --upgrade to upgrade): twisted==10.1 in ./ve/lib/python2.7/site-packages (from -r config/requirements.pip (line 4)) | |
Requirement already satisfied (use --upgrade to upgrade): txamqp==0.5 in ./ve/lib/python2.7/site-packages (from -r config/requirements.pip (line 5)) | |
Requirement already satisfied (use --upgrade to upgrade): Django==1.3 in ./ve/lib/python2.7/site-packages (from -r config/requirements.pip (line 6)) | |
Requirement already satisfied (use --upgrade to upgrade): PyYAML==3.09 in ./ve/lib/python2.7/site-packages (from -r conf |
OlderNewer