Skip to content

Instantly share code, notes, and snippets.

View sidtri's full-sized avatar
🎯
Focusing

sid d sidtri

🎯
Focusing
View GitHub Profile
@sidtri
sidtri / active-record-migration-expert.md
Created September 22, 2016 09:31 — forked from pyk/active-record-migration-expert.md
become active record migration expert (Rails 4.0.2)

become active record migration expert (Rails 4.0.2)

workflow:

create model

$ rails g model NameOfModel
    invoke  active_record
    create    db/migrate/YYYYMMDDHHMMSS_create_name_of_models.rb
@sidtri
sidtri / 0_reuse_code.js
Last active August 29, 2015 14:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
Enable Colorful Terminal in Debian and Ubuntu
`vim .bashrc
Enabling 256 color mode in Ubuntu’s Bash terminal
When I first connected to my headless Ubuntu server and started opening files in Vim, I couldn’t figure out why it was ignoring my Vim color schemes. Everything was displaying in garish blues, reds and yellows.
It took little digging around to figure out that 256 color mode isn’t enabled by default in some versions of Ubuntu, including the server version of Ubuntu 11.10 that I was using. This is how I got my color schemes working.
To determine what mode you’re currently running in, use the following command:
`tput colors`