This gist is a collection of my rough notes from Strange Loop 2012.
# Wrapper around jQuery ajax methods that exposes | |
# returned data by publishing an event | |
# | |
class Ajax | |
@getJSON: (url, event)-> | |
$.getJSON url, (data)-> | |
Event.trigger(event, data) | |
window.Ajax = Ajax |
web: bundle exec puma -p $PORT config.ru |
LuckyLady is a company I founded together with my wife. She offers spiritual advice and counseling through a number of web properties and a custom CRM I develop and maintain. http://www.raizesespirituais.com.br
Objetiva is a consulting company I co-founded. We help startups through their first cycles of product development or when their product has gone down the tube because someone made a mess. At this point we've frozen activities because both my co-founder and myself have burned out on the consulting business. I'm currently still working with one of our clients but it's more an on the side thing. http://www.objetiva.co/?locale=en
# Integer vs Float div by zero gotchas | |
# | |
# | |
1 / 0 = [answer] | |
1.0 / 0 = [answer] | |
1 / 0.0 = [answer] | |
0 / 0.0 = [answer] | |
# String concatenation vs interpolation | |
x = 5 |
This brief guide is written from my own experience with migrating a large (~5GB) MySQL database to PostgreSQL for a Rails project.
No warranties, guarantees, support etc. Use at your own risk and, as always, ENSURE YOU MAKE BACKUPS FIRST!
I chose [pgloader
][1] because it's extremely fast. YMMV.
- Replace
mysql2
gem withpg
inGemfile
. - Update
config/database.yml
for PostgreSQL. I used [Rails' template][2] as a starting point.