git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| // on page load, search for & display a random gif matching your search term using the Giphy API. | |
| // usage: | |
| // include giphy.js in your <head> | |
| // set q to your search term (e.g. "brunch") | |
| // add <span id = "giphyme"></span> wherever you want to display the image. -- FYI, it will be centered. | |
| // big ups to the Giphy crew (giphy.com) | |
| // 2014 - Neal Shyam [@nealrs | nealshyam.com] | |
| document.addEventListener('DOMContentLoaded', function () { | |
| q = "finger guns"; // search query |
| # | |
| # Working with branches | |
| # | |
| # Get the current branch name (not so useful in itself, but used in | |
| # other aliases) | |
| branch-name = "!git rev-parse --abbrev-ref HEAD" | |
| # Push the current branch to the remote "origin", and set it to track | |
| # the upstream branch | |
| publish = "!git push -u origin $(git branch-name)" |
| #!/bin/bash | |
| # | |
| # downcase PATH | |
| # | |
| # Recursively convert all file names contained in the given directory | |
| # tree (but excluding the given directory itself) to lowercase. | |
| # Existing files which are named identical to new, lowercased file | |
| # names will be clobbered. | |
| # | |
| # Author: Ross Paffett <[email protected]> |
| set rnu | |
| au BufEnter * :set rnu | |
| au BufLeave * :set nu | |
| au WinEnter * :set rnu | |
| au WinLeave * :set nu | |
| au InsertEnter * :set nu | |
| au InsertLeave * :set rnu | |
| au FocusLost * :set nu | |
| au FocusGained * :set rnu |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| #!/bin/bash | |
| # Rename all directories. This will need to be done first. | |
| # Process each directorys contents before the directory itself | |
| find * -depth -type d | while read x | |
| do | |
| # Translate Caps to Small letters | |
| y=$(echo "$x" | tr '[A-Z ]' '[a-z_]'); | |
| # create directory if it does not exit | |
| if [ ! -d "$y" ]; then |
| So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear! | |
| Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy. | |
| * Off the top of my head * | |
| 1. Fork their repo on Github | |
| 2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it | |
| git remote add my-fork [email protected] |
| =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') |