Skip to content

Instantly share code, notes, and snippets.

View ryannealmes's full-sized avatar

Ryan-Neal Mes ryannealmes

View GitHub Profile
@ryannealmes
ryannealmes / gist:d112483d59563bc11499
Last active February 4, 2016 13:23
mysql database dumps + restores
Dump:
mysqldump -u USERNAME -p PASSWORD DBTODUMP > /path/to/DUMPFILE.sql
Import:
mysql -u USERNAME -p PASSWORD DBTOIMPORTTO < /path/to/DUMPFILE.sql/
@ryannealmes
ryannealmes / gist:63aa726fffdd0d647f11
Last active August 29, 2015 14:01
SCP - copying files across servers via terminal
scp username@remotecomputer:/path/to/file/you/want/to/copy where/to/put/file/on/laptop
@ryannealmes
ryannealmes / gist:b49b4ef6da278aabb63b
Created May 22, 2014 11:31
Delete a branch locally and remotely
git push origin :<branchName>
@ryannealmes
ryannealmes / gist:f988a90423f38af73bd8
Created May 29, 2014 08:08
Recreate rails database
rake db:drop
rake db:create
rake db:migrate
git log --all --pretty=format:'%h %cd %s (%an)' --since='7 days ago'
git log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
[alias]
co = checkout
ci = commit
st = status
br = branch
hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
type = cat-file -t
dump = cat-file -p
@ryannealmes
ryannealmes / gist:281496ad7093fa64f2ad
Created June 24, 2014 12:37
Start/Stop/Restart mysql Mac
sudo /usr/local/mysql/support-files/mysql.server stop
sudo /usr/local/mysql/support-files/mysql.server start
sudo /usr/local/mysql/support-files/mysql.server restart
@ryannealmes
ryannealmes / gist:cb0d736c9f42e409ef61
Created July 4, 2014 08:21
Clear terminal history
history -c && history -w
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
#!/bin/bash
# Exists to fully update the git repo that you are sitting in...
git pull && git submodule init && git submodule update && git submodule status