List of brew packages I have to have:
- brew install tree
- brew install postgresql
- brew install mysql
- brew install qt
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:
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
SublimeText OSX Command Line https://www.sublimetext.com/docs/3/osx_command_line.html
sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/bin/subl
SublimeText Package Control https://packagecontrol.io/installation
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: |
Connect to MySQL/MariaDB | |
= mysql -uroot | |
Create database | |
= create database db_name; | |
Drop Database | |
= drop database db_name; | |
Connect/use database |
###Step 1: Install XCode
Check if the full Xcode package is already installed:
$ xcode-select -p
If you see:
/Applications/Xcode.app/Contents/Developer
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 |