Skip to content

Instantly share code, notes, and snippets.

View RaVbaker's full-sized avatar
drinking coffee

Rafal Piekarski RaVbaker

drinking coffee
View GitHub Profile
@RaVbaker
RaVbaker / README.md
Last active February 3, 2019 18:04 — forked from mchelen/README.md
JSON Resume sample
@RaVbaker
RaVbaker / initial_state_bug.rb
Last active August 29, 2015 14:19 — forked from Tuhaj/initial_state_bug.rb
Corrected version of initial repo by @Tuhaj
unless File.exist?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'activerecord', '4.2.1'
gem 'state_machines'
gem 'state_machines-activerecord'
gem 'sqlite3'
gem 'minitest'
GEMFILE
@RaVbaker
RaVbaker / geocoder-service.js
Last active August 29, 2015 14:07 — forked from avaliani/geocoder-service.js
My solution is basically original with fixed bugs and removed dependency on underscore. :)
/*
* An AngularJS Service for intelligently geocoding addresses using Google's API. Makes use of
* localStorage (via the ngStorage package) to avoid unnecessary trips to the server. Queries
* Google's API synchronously to avoid `google.maps.GeocoderStatus.OVER_QUERY_LIMIT`.
*
* @author: benmj
* @author: amir.valiani
*
* Original source: https://gist.github.com/benmj/6380466
*/
@RaVbaker
RaVbaker / gist:3894177
Created October 15, 2012 18:27 — forked from demimismo/gist:3359506
Install Postgresql on Mountain Lion

Install Postgresql on Mountain Lion

Based on: http://coderwall.com/p/1mni7w

brew install postgresql
initdb /usr/local/var/postgres -E utf8
mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/postgresql/9.1.4/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
@RaVbaker
RaVbaker / ruby-1.9-tips.rb
Created June 17, 2012 13:51 — forked from igrigorik/ruby-1.9-tips.rb
Ruby 1.9 features, tips & tricks you may not know about...
def tip(msg); puts; puts msg; puts "-"*100; end
#
# 30 Ruby 1.9 Tips, Tricks & Features:
# http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/
#
tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2"
tip "Ruby 1.9 supports named captures in regular expressions!"
@RaVbaker
RaVbaker / LICENSE.txt
Created May 20, 2011 07:54 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
Copyright (c) 2011 YOUR_NAME_HERE, YOUR_URL_HERE
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
# Drop this file in config/initializers to run your Rails project on Ruby 1.9.
# This is three separate monkey patches -- see comments in code below for the source of each.
# None of them are original to me, I just put them in one file for easily dropping into my Rails projects.
# Also see original sources for pros and cons of each patch. Most notably, the MySQL patch just assumes
# that everything in your database is stored as UTF-8. This was true for me, and there's a good chance it's
# true for you too, in which case this is a quick, practical solution to get you up and running on Ruby 1.9.
#
# Andre Lewis 1/2010
# encoding: utf-8