Skip to content

Instantly share code, notes, and snippets.

View rodrigo-galba's full-sized avatar

Rodrigo Galba rodrigo-galba

  • Brazil
View GitHub Profile
@rodrigo-galba
rodrigo-galba / wiki.md
Created December 27, 2017 02:40
Heroku + Godaddy

This is a guide on how to configure multiple domain providers with a Rails app (or any web app actually!) on Heroku and GoDaddy

Setting up Heroku

  1. On the project folder you need to run the heroku domains:add heroku domains:add www.example.com where the www.example.com is your actual domain. Remember you can always add multiple domains this way.

Setting up GoDaddy

  1. Sign in to GoDaddy, go to the domains list, pick your domain or click on the manage button. This will take you to your domain configuration.
@rodrigo-galba
rodrigo-galba / install-mongo.sh
Created November 24, 2017 17:47
Ubuntu 16: MongoDB install
#!/bin/bash -x
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
sudo apt update
sudo apt install -y mongodb-org
sudo systemctl enable mongod
sudo vim /etc/mongod.conf
-- change access config if necessary
sudo systemctl start mongod

Doogle

  • Desenvolver uma aplicação em Rails4 (com frontend) no qual o usuário digite uma palavra e a aplicação retorne os significados dela.

  • Caso os significados de uma palavra já existam no banco de dados da aplicação, use-as, caso não, consumir a API http://www.dictionaryapi.com/ e armazenar no banco local.

  • Seguir os padrões W3C para o HTML semântico.

  • Desenvolver frontend usando obrigatoriamente Bootstrap.

@rodrigo-galba
rodrigo-galba / gist:7202822
Created October 28, 2013 19:15
Convert FAT to NTFS - wind 7 and higher
convert <UNIT_NAME>: /fs:ntfs

How to use a PS3 controller on Mac OS X 10.7 (Lion)

  1. Open Apple menu -> System Preferences -> Bluetooth and disable Bluetooth on Mac as well as any other nearby Macs or devices which will try to pair with and confuse the controller.

  2. Reset PS3 controller by inserting paperclip into pinhole near L2 button.

  3. Connect PS3 controller to Mac with USB cable.

  4. Enable Bluetooth.

@rodrigo-galba
rodrigo-galba / gist:6713661
Last active December 23, 2015 23:59
How to install APP by link
For example, on that link http://emu4ios.weebly.com/downloads.html .
Enterprise accounts doesn't requires to know client's UUID.
With enterprise account, just have a HTML pointing to a MANIFEST file that points to IPA.
@rodrigo-galba
rodrigo-galba / gist:6414493
Last active December 22, 2015 04:08
Mysql - enable access remote (for dev environment!)
$ sudo vim /etc/mysql/my.cnf
#comment out this line (add # in front of the line)
#bind-address = 127.0.0.1
$ sudo service mysql restart
mysql stop/waiting
mysql start/running, process 13081
@rodrigo-galba
rodrigo-galba / gist:6054063
Created July 22, 2013 14:03
Convert MP3 to CAF
afconvert -f caff -d LEI16@22050 yourInput.mp3 yourOutput.caf
@rodrigo-galba
rodrigo-galba / gist:4676177
Created January 30, 2013 19:46
Browser instant editor
Transforme seu browser num editor de texto.
Coloque isso na barra de endereços (remova as aspas):
"data:text/html, <html contenteditable>"
@rodrigo-galba
rodrigo-galba / gist:4529605
Created January 14, 2013 11:58
Eclipse Deployment Assembly does not appear in properties
Try to add <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> to your .project file
Source: http://stackoverflow.com/questions/8399885/eclipse-deployment-assembly-does-not-appear-in-properties