This file contains 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 | |
#: Title : xxx.bash | |
#: Usage : xxx.bash [-m] [-i item] target | |
#: Synopsis : for bash script setup | |
#: Date : 2015-02-13 11:23:04 | |
#: Author : shulei | |
#: version : 1.0 | |
#: Description : be used to setup bash script for jenkins job or daily bash script | |
#: Required : target => which target | |
#: Options : -i set items |
This file contains 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
# Remove SVN files from any folder | |
rm-svn-files() { | |
find "$1" -name *.svn | xargs rm -rf | |
} |
This file contains 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
# Recursively remove all .svn directories | |
find . -name .svn -print0 | xargs -0 rm -rf |
This file contains 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
# 1. use command -v | |
command -v foo >/dev/null 2>&1 || { echo >&2 "I require foo but it's not installed. Aborting."; exit 1; } | |
# 2. use type . | |
if ! type "$foobar_command_name" > /dev/null; then | |
# install foobar here | |
fi |
This file contains 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 | |
wc -l `find ../src/main -regex ".*\.\(java\|html\|js\|css\)" -not -path "../src/main/webapp/assets/bower_components/*" -not -path "../src/main/webapp/assets/components/*"` | |
wc -l $(find . -type f -regex ".*\.*\.*" -not -path "./.git/*") |
This file contains 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/sh | |
# A POSIX variable | |
OPTIND=1 # Reset in case getopts has been used previously in the shell. | |
# Initialize our own variables: | |
output_file="" | |
verbose=0 | |
while getopts "h?vf:" opt; do |
This file contains 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 | |
#usage: ./myscript.sh -e conf -s /etc -l /usr/lib /etc/hosts | |
while [[ $# > 1 ]] | |
do | |
key="$1" | |
shift | |
case $key in | |
-e|--extension) | |
EXTENSION="$1" |
This file contains 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 | |
for i in "$@" | |
do | |
case $i in | |
-e=*|--extension=*) | |
EXTENSION="${i#*=}" | |
shift | |
;; | |
-s=*|--searchpath=*) |
This file contains 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
{ | |
"name": "canvas-clock", | |
"description": "A starter project for canvas", | |
"version": "0.0.0", | |
"license": "MIT", | |
"private": true, | |
"dependencies": { | |
"bootstrap": "~3.1.1" | |
} | |
} |
This file contains 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
{ | |
"version": "0.0.0", | |
"name": "canvas-clock", | |
"description": "A canvas clock ", | |
"private": true, | |
"license": "MIT", | |
"engines": { | |
"node": "0.10.x", | |
"npm": "1.3.x" | |
}, |
OlderNewer