Skip to content

Instantly share code, notes, and snippets.

View danielvlopes's full-sized avatar

Daniel Lopes danielvlopes

View GitHub Profile
@jasonrudolph
jasonrudolph / 00-about.md
Created September 21, 2012 18:42
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
@jbhannah
jbhannah / Procfile
Last active May 10, 2017 06:50
Jekyll on Heroku without Rack::Jekyll or custom buildpacks
web: bundle exec puma -p $PORT config.ru

May 2012 - Present (9 months)

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

Programmer @ objetiva, November 2010 - Present (2 years 3 months)

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

@pricees
pricees / Ruby Basic
Last active August 29, 2015 13:56
My Ruby Litmus Test.rb
# 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
@tristanm
tristanm / README.md
Last active November 22, 2024 15:47
Migrating a Rails project from MySQL to PostgreSQL

Migrating a Rails project from MySQL to PostgreSQL

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.

  1. Replace mysql2 gem with pg in Gemfile.
  2. Update config/database.yml for PostgreSQL. I used [Rails' template][2] as a starting point.