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: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
[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
@ryannealmes
ryannealmes / gist:3187eb7f94eb5fca0a2d
Created November 10, 2014 15:09
Adding terminal short cuts for applications

Create a sym link between the application and a folder.

ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/sublime

Make sure that folder is included in your .bash_profile export PATH

@ryannealmes
ryannealmes / gist:062283cf66b126f8eb85
Created December 19, 2014 13:23
Check for apache config errors
sudo apachectl -t