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
cat << EOF | nc vmcentos64 80 > gitlist_landing_page.txt | |
GET /gitlist/ HTTP/1.1 | |
Host: vmcentos64 | |
User-Agent: netcat | |
EOF |
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/sh | |
# read the user name from stdin line by line | |
while read u | |
do | |
rm -f ${u} | |
rm -f ${u}.pub | |
ssh-keygen -t rsa -b 2048 -N "" -C "SSH keypair for $u" -f ${u} | |
done |
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
git config --global user.name "John Doe" | |
git config --global user.email "[email protected]" | |
git config --global core.editor vim | |
git config --global color.ui true | |
git config --global merge.tool vimdiff | |
git config --global push.default simple | |
git config --global alias.co checkout | |
git config --global alias.br branch | |
git config --global alias.ci commit | |
git config --global alias.st status |
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
for entry in $(git for-each-ref --format="%(objectname)|%(refname)") | |
do | |
oldref=$(echo $entry | cut -d '|' -f 2) | |
if [[ $oldref =~ 'remotes' ]]; then | |
sha=$(echo $entry | cut -d '|' -f 1) | |
if [[ $oldref =~ 'remotes/tags' ]]; then | |
newref=$(echo $oldref | sed -e 's/remotes\/tags/tags/') | |
elif [[ $oldref =~ 'remotes' ]]; then | |
newref=$(echo $oldref | sed -e 's/remotes/heads/') | |
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
git filter-branch --msg-filter 'perl -e '\''while(<>) {print join(q/: /, split(/\s*:\s*/, $_, 2))}'\''' -- --all | |
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d |
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 | |
# This script should be launched under the top level git directory. | |
function clean_up() { | |
rm -fr .git/svn | |
rm -fr .git/info/grafts | |
git branch -d trunk | |
git gc | |
} |
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
for t in $(git for-each-ref --format="%(refname)") | |
do | |
c=$(git rev-list HEAD..$t) | |
if [[ ! -z $c ]]; then | |
echo $t | |
fi | |
done |
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 | |
# Bash script to determine if current branch(default HEAD) | |
# need rebase the changes from the integration | |
# branch(default master) | |
# Author: Justin Zhang <[email protected]> | |
# Created: 2013-12-04 | |
# | |
# Usage: | |
# check_rebase.sh [current branch] [integration branch] | |
# |
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 | |
base=$1 | |
archive=$2 | |
currentBranch=$(git rev-parse --abbrev-ref HEAD) | |
currentBranch=${currentBranch//heads\//} | |
if [[ -z $base ]] | |
then | |
base=bl_${currentBranch} |
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
hostname="vmfreebsd92" | |
ifconfig_em0="DHCP" | |
ifconfig_em1="inet 192.168.56.104 netmask 255.255.255.0" | |
defaultrouter="192.168.1.1" | |
sshd_enable="YES" | |
ntpd_enable="YES" |