Skip to content

Instantly share code, notes, and snippets.

$pathLangFile = 'lang/' . $this->language . '.php';
$this->debug($pathLangFile, 'defaults values');
if(file_exists($pathLangFile)){
require($pathLangFile);
} else {
die('<h3 class="error">error: don\'t load language file.</h3>');
}
$this->t = new language();
$this->h = new html($this->language);
#!/bin/sh
#This is a start script for nginx. Tested on Unbuntu Edge.
#Should work on Ubuntu, Debian and probably a few other Linux distros.
#Change DAEMON and CONFIG_FILE if neccessary
PATH=/sbin:/bin:/usr/sbin:/usr/bin
#Location of nginx binary. Change path as neccessary
dns - http://freedns.ws
google apps - http://google.com/a
yola, pra criar o site - http://www.yola.com/
logonerds, logos por $50 - http://www.logonerds.com/
wuffo, forms builder - http://wufoo.com/
analytics, pra monitorar - http://www.google.com/analytics/
blog (tumblr)
twitter
adwords
# Gems for Ruby 1.9.1
gem install rails rails-sqlserver-2000-2005-adapter acts_as_tree acts_as_versioned activerecord-tableless annotate capistrano erubis haml haml-edge inherited_resources nifty-generators rack rack-cache racksh sqlite3-ruby will_paginate passenger
gem install cucumber rspec rspec-rails shoulda test-spec ZenTest autotest-fsevent autotest-growl autotest_screen email_spec factory_girl faker fakeweb log4r metric_fu mocha quietbacktrace rcov integrity webrat Selenium tarantula mash wirble hirb ruby2ruby RubyInline
gem install authlogic authlogic-oid bundler closure-compiler coderay compass cs-active_form dry_scaffold feed-normalizer formtastic has_scope hobo htmlentities validatable liquid newrelic_rpm paperclip responders searchlogic settingslogic thin tlsmail unicorn yui-compressor jammit lockdown
gem install BlueCloth lesstile markaby rdiscount RedCloth nokogiri libxml-ruby hpricot httparty httpclient mechanize rest-client xml-simple restfulie feedzirra prawn rss-client soap4r xmpp4r xm
# Gems for Ruby Enterprise Edition 1.8.7
gem install rails mongrel rails-sqlserver-2000-2005-adapter acts_as_tree acts_as_versioned activerecord-tableless annotate capistrano erubis haml haml-edge inherited_resources nifty-generators rack rack-cache racksh ruby-debug sqlite3-ruby will_paginate passenger
gem install cucumber rspec rspec-rails shoulda test-spec ZenTest autotest-fsevent autotest-growl autotest_screen email_spec factory_girl faker fakeweb log4r metric_fu mocha quietbacktrace rcov integrity webrat Selenium tarantula mash wirble hirb ruby2ruby RubyInline
gem install authlogic authlogic-oid bundler closure-compiler coderay compass cs-active_form dry_scaffold feed-normalizer ferret formtastic has_scope heroku hobo htmlentities validatable liquid newrelic_rpm paperclip responders searchlogic settingslogic thin tlsmail unicorn yui-compressor jammit lockdown
gem install BlueCloth lesstile markaby rdiscount RedCloth ultraviolet nokogiri libxml-ruby hpricot httparty httpclient mechanize rest-client
require 'rubygems'
require 'eventmachine'
require 'em-http' # gem install em-http-request
require 'yajl' # gem install yajl-ruby
module ChatClient
def post_init
@name = "anonymous_#{ChatClient.client_num+=1}"
@sid = ChatClient.channel.subscribe(method(:send_msg))
@buf = ''

Rails 3.0.pre on App Engine

You can Rails 3 on App Engine, but it won’t be especially useful until bundler 10. You should try these instead:

Install the Development Environment

The gems for the development environment include a pre-release appengine-tools gem that provides a pre-release version of jruby-rack.

This is an example of using RVM's Project .rvmrc file
to have it automatically bootstrap your environment, including bundler.
This could be further expanded to do anything you require :)
The important thing to remember is that the purpose of these files is
to allow you to very easily have your 'project context' (aka 'environment')
loaded automatically for you when you enter the project in the shell (cd).
You can generate the .rvmrc file below by running:
This is an example of using RVM's Project .rvmrc file
to have it automatically bootstrap your environment, including bundler.
This could be further expanded to do anything you require :)
The important thing to remember is that the purpose of these files is
to allow you to very easily have your 'project context' (aka 'environment')
loaded automatically for you when you enter the project in the shell (cd).
You can generate the .rvmrc file below by running:
@lcosta
lcosta / ruby-1.9-tips.rb
Created February 3, 2011 20:20 — forked from igrigorik/ruby-1.9-tips.rb
New Ruby 1.9 Features, Tips & Tricks
def tip(msg); puts; puts msg; puts "-"*100; end
#
# 30 Ruby 1.9 Tips, Tricks & Features:
# http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/
#
tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2"
tip "Ruby 1.9 supports named captures in regular expressions!"