Skip to content

Instantly share code, notes, and snippets.

@fitoria
fitoria / gist:217614
Created October 24, 2009 16:37 — forked from leah/gist:216443
:⌉
=⌉
¦-) as opposed to |
⍥ om nom nom
@xenda
xenda / Instalamos Passenger
Created February 16, 2010 21:06
Instalación Ruby y Rails
#Dependencias previas
sudo apt-get install libc6 libpcre3 libpcre3-dev libpcrecpp0 libssl0.9.8 libssl-dev zlib1g zlib1g-dev lsb-base
#Instalamos Passenger
sudo gem install passenger
sudo passenger-install-apache-module
@woodie
woodie / README.rdoc
Created July 22, 2010 17:02
Rails 2.3.8 on App Engine with DataMapper

Rails 2.3.8 on App Engine (DataMapper)

Do not use rvm (or install and run from JRuby). The google-appengine gem must install into your system MRI. The appengine-sdk gem includes a complete Java app server. We bootstrap Java from MRI, then your app runs inside a servlet container (with access to all the APIs) using the version of JRuby installed into each app.

We assumed Rails 2 would never work without rubygems, and we committed to gem bunlder for JRuby on App Engine, so we were waiting for Rails 3. Fortunately, Takeru Sasaki was able to patch the Rails 2.3.x calls to rubygems, and now we have it working. Rails 2.3.x currently spins up several seconds faster than Rails 3, and just a few seconds behind Sinatra.

See the TInyDS version also: gist.github.com/gists/269075

Install the Development Environment

@jonraasch
jonraasch / highlight.js
Created September 2, 2010 22:14
Live on-page text highlighting
/*
highlight v3 !! Modified by Jon Raasch (http://jonraasch.com) to fix IE6 bug !!
Highlights arbitrary terms.
<http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html>
MIT license.
@hiddentrak
hiddentrak / NextGenAlbumVO
Created February 15, 2011 10:23
Add NextGen Gallery plugin support to FlashPress
<?php
/**
* Vo Object for NextGen Album Object
*
* @package flashpress.vo
* @author Myles Bieniasz
**/
class NextGenAlbumVO {
var $_explicitType = "flashpress.vo.NextGenAlbumVO";
@netmute
netmute / README.md
Last active October 9, 2024 08:32
Game of Life in 140 chars of Ruby

Game of Life

An implementation of Conway's Game of Life in 140 characters of Ruby.

Author

Created by Simon Ernst (@sier).

@pheisiph
pheisiph / application_helper.rb
Created April 8, 2012 13:08
Useful standard classes I add to body tags in all my rails apps
module ApplicationHelper
# Public: Add a bunch of default class names to your html body element.
# By default it adds the name of the application, the current
# controller and the action
#
# classes - Arbitrary class names that are appended. Can be an Array
# of Strings or Symbols, or a single String or
# Symbol (or any to_s responder).
#
# Examples
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
@dedico
dedico / pre-commit
Created May 30, 2012 12:07
Git pre-commit hook to precompile assets if anything changed in app/assets or vendor/assets
#!/bin/bash
# source rvm and .rvmrc if present
[ -s "$HOME/.rvm/scripts/rvm" ] && . "$HOME/.rvm/scripts/rvm"
[ -s "$PWD/.rvmrc" ] && . "$PWD/.rvmrc"
should_precompile=0
# check if anything changed in app/assets
if git diff-index --name-only HEAD | egrep '^app/assets' >/dev/null ; then
@unak
unak / history.txt
Last active November 29, 2021 01:40
The History of Ruby
* Only the releases of the stable versions are listed in principle. The releases of the unstable versions especially considered to be important are indicated as "not stable."
* The branches used as the source of each releases are specified, and the branching timing of them are also shown. BTW, before subversionizing of the repository, the term called "trunk" was not used, but this list uses it in order to avoid confusion.
* In order to show a historical backdrop, big conferences (RubyKaigi, RubyConf and Euruko) are also listed. About the venues of such conferences, general English notations are adopted, in my hope.
* ruby_1_8_7 branch was recut from v1_8_7 tag after the 1.8.7 release because of an accident.
* 1.2.1 release was canceled once, and the 2nd release called "repack" was performed. Although there were other examples similar to this, since the re-releases were performed during the same day, it does not write clearly in particular.
* Since 1.0 was released with the date in large quantities, the mi