This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| findString() { | |
| if [ -z "$1" ] | |
| then | |
| echo "usage: findString "string" [whereToLook]" | |
| return 1 | |
| fi | |
| if [ -z "$2" ] | |
| then | |
| wheretolook=$(pwd) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| echo $1 | |
| ps aux | grep $1 | grep -v grep | awk '{print $2}' | xargs kill -9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [ -z "$1"] | |
| then | |
| WORKSPACE=$(dirname $0)/.. | |
| else | |
| WORKSPACE=$1 | |
| fi | |
| find $WORKSPACE -type f -name "*.orig" -print | xargs -0 rm -f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| DEPLOY_DIR=/opt/udeploy/server | |
| PWD=$(dirname $0) | |
| if [ -n "$1" ] ; then | |
| # run jslint | |
| git --git-dir $PWD/../.git --work-tree $PWD/.. jslint | |
| LINT_EXIT=$? | |
| # only keep going if exit 0 | |
| if [ "$LINT_EXIT" -ne "0" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| DEPLOY_DIR=/opt/udeploy/server | |
| VERSION=dev | |
| DIR=$(dirname $0) | |
| if [ -z "$1" ] | |
| then | |
| git jslint --git-dir $DIR/.. --work-tree $DIR/.. | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| git rev-parse || exit 1 | |
| #jslint properly handles no files being specified | |
| DIFFBASE=HEAD | |
| FILES=$( git diff --diff-filter=AMCR --name-only --relative "$DIFFBASE" -- "$@" ) | |
| if [ -z "$FILES" ] | |
| then | |
| echo "no files to scan" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| remote=$(git config --get submit.remote ) | |
| current=$( git rev-parse --symbolic-full-name --abbrev-ref HEAD ) | |
| upstream=$(git rev-parse --symbolic-full-name --abbrev-ref @{u} ) | |
| upstream=${upstream#*/} # trim the leading remote name portion | |
| if [ -z "$remote" ] | |
| then | |
| echo "submit.remote is not set" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [ -z $1 ] | |
| then | |
| echo "Must supply a git project." | |
| echo "Usage git gclone <project-url>" | |
| return 1 | |
| fi | |
| ORIGIN=$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import urllib2 | |
| from bs4 import BeautifulSoup as bs | |
| def scrape_site(url): | |
| result = [] | |
| soup = bs(urllib2.urlopen(url).read()) | |
| for img in soup.find_all('img'): | |
| if img.has_attr('alt'): | |
| src = img.get('src') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # An example hook script to verify what is about to be committed. | |
| # Called by "git commit" with no arguments. The hook should | |
| # exit with non-zero status after issuing an appropriate message if | |
| # it wants to stop the commit. | |
| # | |
| # To enable this hook, rename this file to "pre-commit". | |
| array_contains() { |
OlderNewer