Skip to content

Instantly share code, notes, and snippets.

View gentilfp's full-sized avatar
🚀
Either cooking or coding

Felipe Gentil gentilfp

🚀
Either cooking or coding
View GitHub Profile
@gentilfp
gentilfp / gist:e723cc48696095406298
Created November 14, 2014 13:17
Auto start REDIS on MacOS
# Install redis with homebrew :)
$ brew install redis
# Create a deamon
$ sudo vim /Library/LaunchDaemons/io.redis.redis-server.plist
# Paste the following content
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
@gentilfp
gentilfp / gist:fe7800764007936363c3
Created December 7, 2014 19:57
Install pg gem with Postgres.app
gem install pg -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/9.3/bin/pg_config
use sudo find / -name "pg_config" to find the path
@gentilfp
gentilfp / gist:9660efb22466e14de815
Created December 7, 2014 19:57
Error Nokogiri MacOS
brew update
Note: In OSX 10.9+ you may need to install xCode command tools to allow you to install libiconv.
xcode-select --install
then install a newer version of libiconv
brew install libiconv
then link your new iconv libs:
brew link libiconv
@gentilfp
gentilfp / gist:53870ade587f6d063f91
Created December 7, 2014 23:03
Bootable Yosemite - External HDD
sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Yosemite.app --nointeraction
@gentilfp
gentilfp / gist:400fe2fce94cf2895176
Last active August 29, 2015 14:13
Install ruby-oci8
Step 1
Go to oracle web site for some downloads http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html.
Step 2
Download: instantclient-sqlplus, instantclient-sdk, instantclient-basic
Step 3
Create directories at /opt/oracle incase its not yet created with following command:
$ mkdir /opt/oracle
Install the Server
brew update
brew install rabbitmq
The RabbitMQ server scripts are installed into /usr/local/sbin. This is not automatically added to your path, so you may wish to add
PATH=$PATH:/usr/local/sbin to your .bash_profile or .profile.
The server can then be started with rabbitmq-server.
@gentilfp
gentilfp / gist:9074eefd475ab9dfb7fa
Created January 8, 2015 12:55
(pry) output error: #<NameError: uninitialized constant Moped::BSON>
Add to .pryrc
Moped::BSON = BSON
@gentilfp
gentilfp / gist:6ae3b4cbf99b150c6109
Created January 8, 2015 13:17
Disable vim mode - ZSH
Edit .inputrc
Comment line! :-)
@gentilfp
gentilfp / gist:76fc75fbf3853d95eb32
Created February 7, 2015 10:37
Importing and Exporting Heroku database
# Export
$ heroku pgbackups:capture
$ curl -o latest.dump `heroku pgbackups:url --app APP`
$ pg_restore --verbose --clean --no-acl --no-owner -h localhost -U myuser -d mydb latest.dump
# Import
$ PGPASSWORD=mypassword pg_dump -Fc --no-acl --no-owner -h localhost -U myuser mydb > mydb.dump
$ heroku pgbackups:restore DATABASE 'https://s3.amazonaws.com/me/items/3H0q/mydb.dump'
https://devcenter.heroku.com/articles/heroku-postgres-import-export
source 'https://rubygems.org'
ruby '2.2.0'
gem 'rails', '4.2.0'
# gem 'devise'
# DB
# gem 'mysql2'
# gem 'pg'