Skip to content

Instantly share code, notes, and snippets.

@gbuesing
gbuesing / ml-ruby.md
Last active February 28, 2024 15:13
Resources for Machine Learning in Ruby

UPDATE a fork of this gist has been used as a starting point for a community-maintained "awesome" list: machine-learning-with-ruby Please look here for the most up-to-date info!

Resources for Machine Learning in Ruby

Gems

@wsargent
wsargent / docker_cheat.md
Last active August 31, 2023 12:10
Docker cheat sheet
@jjaffeux
jjaffeux / delegation_rubymotion.rb
Last active December 11, 2015 07:08
Event delegation rubymotion example
#example
class Request
attr_accessor :delegate
def self.initWithPath(*args, &block)
instance = allocate
instance.myInitializer(*args, &block)
instance
end
@crhan
crhan / site.yml
Created September 12, 2012 11:14
Ruhoh Sitemap Generator
plugins:
sitemap_generator: # all optional
file_name: sitemap.xml
exclude_id:
- search.html
- pages.html
change_frequency_custom_name: changefreq
priority_custom_variable_name: priority
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@mmrwoods
mmrwoods / example_migration.rb
Created October 26, 2010 16:38
Rails migration helper for dealing with large tables in MySQL
require "mysql_big_table_migration_helper"
class AddIndexOnSomeColumnToSomeTable < ActiveRecord::Migration
extend MySQLBigTableMigrationHelper
def self.up
add_index_using_tmp_table :some_table, :some_column
end
@woodie
woodie / README.rdoc
Created January 3, 2010 23:32
Rails 2.3.5 on App Engine with DataMapper

Rails 2.3.5 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