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 | |
| # Bash shell script for generating self-signed certs. Run this in a folder, as it | |
| # generates a few files. Large portions of this script were taken from the | |
| # following artcile: | |
| # | |
| # http://usrportage.de/archives/919-Batch-generating-SSL-certificates.html | |
| # | |
| # Additional alterations by: Brad Landers | |
| # Date: 2012-01-27 |
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
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| #!/bin/bash | |
| ## uploading to google | |
| ## rev: 22 Aug 2012 16:07 | |
| det=`date +%F` | |
| browser="Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0.1" | |
| username="[email protected]" | |
| password="password" | |
| accountype="HOSTED" #gooApps = HOSTED , gmail=GOOGLE |
| #!/bin/bash | |
| # geoip-update.sh -- update geoip lite database(s). | |
| # author: [email protected] | |
| #prg="wget --quiet" | |
| prg="wget" | |
| download_path="/usr/share/GeoIP/download" | |
| geolite_path="/usr/share/GeoIP" |
| #!/bin/bash | |
| # | |
| # Version 1.4 | |
| # | |
| # twrp.sh -- a TWRP compatible backup script for your computer | |
| # Brought to you by inhies | |
| # | |
| # This script creates TWRP compatible backups over usb using adb and magikz | |
| # By default it makes a folder in the standard TWRP date--time format (I think) | |
| # To restore these backups, place the folder in /sdcard/TWRP/BACKUPS/<serialnumber>/ |
| var ua = navigator.userAgent; | |
| if( ua.indexOf("Android") >= 0 ) | |
| { | |
| var androidversion = parseFloat(ua.slice(ua.indexOf("Android")+8)); | |
| if (androidversion < 2.3) | |
| { | |
| ... | |
| } | |
| } |
Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh
Easily checkout local copies of pull requests from remotes:
git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it outgit pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out| from flask import Flask,send_from_directory | |
| import os | |
| UPLOAD_FOLDER = os.getcwd() | |
| application = app = Flask(__name__) | |
| app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER | |
| @app.route('/snapshots/trunk/ar71xx/packages/') |
| SCRIPT_DIR=`dirname ${BASH_SOURCE[0]-$0}` | |
| SCRIPT_DIR=`cd $SCRIPT_DIR && pwd` |