Skip to content

Instantly share code, notes, and snippets.

View fzrhrs's full-sized avatar

fzrhrs

View GitHub Profile
@fzrhrs
fzrhrs / Github
Last active November 16, 2016 09:35
Github
git show commithash
git log --author=name
git log --grep=word
(undo last commit)
git reset --soft HEAD~1
(ammend last commit message)

List of brew packages I have to have:

  • brew install tree
  • brew install postgresql
  • brew install mysql
  • brew install qt

To install a gem in a global gemset

rvm @global do gem install ...

To use a specific gemset

rvm use ruby-2.1.4@rails4.1
@fzrhrs
fzrhrs / Vim Cheat Sheet
Created December 28, 2014 08:19
Vim Cheat Sheet
Create new file/existing file
`Vi file_name`
Insert mode
`i`
To save and quit
`:wq`
To quit
https://docs.docker.com/reference/commandline/cli/#ps
docker images
docker load -i
docker run -it
docker ps -a (-a for all)
docker attach [names]
docker exec
Remove old containers:
@fzrhrs
fzrhrs / MySQL Cheat Sheet
Last active August 29, 2015 14:10
MySQL Cheat Sheet
Connect to MySQL/MariaDB
= mysql -uroot
Create database
= create database db_name;
Drop Database
= drop database db_name;
Connect/use database
@fzrhrs
fzrhrs / Setup for Ruby on Rails development.md
Last active April 16, 2021 10:52
How to Install Xcode, Homebrew, Git, RVM, Ruby, Rails, Heroku Toolbelt and Postgres (Yosemite)

###Step 1: Install XCode

Check if the full Xcode package is already installed:

$ xcode-select -p

If you see:

/Applications/Xcode.app/Contents/Developer

@fzrhrs
fzrhrs / PostgreSQL Cheat Sheet
Last active August 29, 2015 14:06
PostgreSQL Cheat Sheet
PostgreSQL Cheat Sheet
To start type:
psql
To list all databases:
\list
To connect to a database:
\c (name of database)
require 'rspec'
class Anagram
end
def ac(a,b)
if a.length == b.length
if a.split('').sort == b.split('').sort
true
else