Skip to content

Instantly share code, notes, and snippets.

Ancient City Ruby is a two-day single-track Ruby conference in America’s oldest city, St. Augustine, Florida.

“America” | Settlement | City | Continiously inhabited | European | European and still inhabited
America | Puerto Hormiga, 4000 BC | Caral, 2627 BC | Ticul, 700 BC* | Eystribyggð, 985 | Santo Domingo, 1498
North America | Kaminaljuyu, 1500 BC | Kaminaljuyu, 1500 BC | Ticul, 700 BC* | Eystribyggð, 985 | Santo Domingo, 1498
Mexico, USA & Canada | Ticul, 700 BC | Ticul, 700 BC | Ticul, 700 BC | L’Anse aux Meadows, 1003 | Veracruz, 1519
USA | Cahokia, 650 | Cahokia, 650 | Acoma Pueblo, 1000 | San Juan, 1521 | San Juan, 1521
USA continental | Cahokia, 650 | Cahokia, 650 | Acoma Pueblo, 1000 | Pensacola, 1559 | Pensacola, 1559

  • Kaminaljuyu is now part of Guatemala C
require 'thread'
class Actor
class ActorDied < RuntimeError; end
def self.queue
@queue ||= Queue.new
end
def self.push(x)
queue.push(x)
@josevalim
josevalim / 0_README.md
Created September 13, 2012 21:52
Sinatra like routes in Rails controllers

Sinatra like routes in Rails controllers

A proof of concept of having Sinatra like routes inside your controllers.

How to use

Since the router is gone, feel free to remove config/routes.rb. Then add the file below to lib/action_controller/inline_routes.rb inside your app.

@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@xdite
xdite / 42-things.md
Created July 14, 2012 05:11
Ten (42) Things You Didn't Know Rails Could Do
@justinko
justinko / Plea.markdown
Created May 30, 2012 19:40
Am I doing it wrong?

Dear Rubyists,

I just lost a contract because of my code in a Rails project.

The specific code in question is related to a "posting a comment" feature. Here are the details:

In this project, "posting a comment" does not simply entail inserting a row into the database. It involves a procedure to yes, insert a row, but also detect its language, check for spam, send emails, and "share" it to Twitter and Facebook. I believe this algorithm should be encapsulated. I do not believe it belongs in a controller or a model. I do not believe Active Record callbacks should be used.

The "senior developer", whom is the stake holder's right hand man, said this:

class ActiveRecord::Base
attr_accessible nil
def update_attributes *args
raise "Don't call #{self.class.name}#update_attributes. " +
"Mass assignment is pure evil."
end
end
@tundal45
tundal45 / unix_books.md
Created February 20, 2012 20:03
This is a list of UNIX books that one should have around to get better at UNIX. The initial list below is started with recommendations from [Avdi Grimm](twitter.com/avdi). The idea is to have more people recommend books that need to be added to the list.
@BPScott
BPScott / readme.md
Last active February 7, 2024 16:16
Github suggestion: Per-organization email overrides

This totally happened, y'all can stop +1ing this now. GitHub Blog post. Direct link to settings where you can set this.


#Per-organization / per-repo email overrides - A feature suggestion

Here the concepts "organization" and "user" are interchangeable, I'm talking about an entity that owns a repo, whether it is jQuery or John Resig. I'll stick to using organization as it best represents my original use-case.

##TL;DR

@paulirish
paulirish / utmstrip.user.js
Last active September 17, 2024 11:03
userscript: Drop the UTM params from a URL when the page loads
// ==UserScript==
// @name UTM param stripper
// @author Paul Irish
// @namespace http://github.com/paulirish
// @version 1.2
// @description Drop the UTM params from a URL when the page loads.
// @extra Cuz you know they're all ugly n shit.
// @include http*://*
// ==/UserScript==