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
D: | |
md work\Topics | |
cd work\Topics | |
cinst curl | |
cinst nodejs.install | |
set path=%path%;C:\Program Files\nodejs | |
setx path "%path%" /m | |
npm install -g bower | |
bower install bootstrap | |
bower install knockout |
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
# A simple module to wrap a nicer interface around Write-Progress. | |
# It allows you to first register each step you're going to perform and | |
# then you activate/set each step as you progress through your script. | |
$progress = New-Module -ScriptBlock { | |
[string]$title = 'Progress' | |
[int]$totalSteps = 0 | |
function Activity { | |
param([string]$activity) |
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
if (!(Test-Path "$env:Temp\streams.exe")) { | |
(new-object System.Net.WebClient).DownloadFile('http://live.sysinternals.com/streams.exe', "$env:Temp\streams.exe") | |
} | |
# "Unblock" the files... | |
& "$env:Temp\streams.exe" @('-d', '*.*') |
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
# Install nodejs under /usr/local/Cellar/node/0.10.26/ | |
brew update | |
brew install node | |
# install global node modules under /usr/local/lib/node_modules/ | |
npm install -g grunt-cli | |
npm install -g yo | |
npm install -g bower | |
npm install -g generator-angular | |
npm install -g protractor |
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
# See: https://www.npmjs.org/package/node-gyp | |
$vsVersion = "2012" | |
if (Test-Path HKLM:\Software\Microsoft\VisualStudio\12.0) { | |
$vsVersion = "2013" | |
} | |
npm.cmd config set msvs_version $vsVersion |
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
# see: https://github.com/boot2docker/boot2docker/pull/284 | |
URL=$(curl -s https://medium.com/boot2docker-lightweight-linux-for-docker/boot2docker-together-with-virtualbox-guest-additions-da1e3ab2465c | grep -io '"http://[^"]*iso"' | sed -E 's/"(.*)"/\1/' | head -1) | |
if [ -f ~/.boot2docker/boot2docker.iso ] && [ ! -f ~/.boot2docker/boot2docker-original.iso ] | |
then | |
echo Backup existing file to ~/.boot2docker/boot2docker-original.iso ... | |
mv ~/.boot2docker/boot2docker.iso ~/.boot2docker/boot2docker-original.iso | |
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
function mkrepo () { | |
BBUSER=user | |
BBPASS=password | |
BBLOGIN=$BBUSER:$BBPASS | |
DIR=${PWD##*/} | |
echo "Making BitBucket repo '$DIR' ..." | |
git init | |
curl -u $BBLOGIN -X POST https://api.bitbucket.org/1.0/repositories/ -d "name=$DIR&is_private=1" -v | |
git remote add origin https://$BBUSER@bitbucket.org/$BBUSER/$DIR.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
{ | |
"name": "Tools", | |
"url": "http://20.30.40.50:8080/tfs/DefaultCollection/Project/_git/Tools", | |
"description": "Internal developer tools", | |
"developers": [ | |
"Gert Lombard <gert.lombard@gmail.com>" | |
], | |
"dependencies": [ | |
"http://20.30.40.50:8080/tfs/DefaultCollection/Other/_git/Libraries" | |
], |
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
GUEST_VMX=`vmrun list | tail -n+2` | |
GUEST_IP=`vmrun getGuestIPAddress "$GUEST_VMX"` | |
ssh root@$GUEST_IP |
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
class GerritUsersListProvider(object): | |
def get_users(self): | |
"""Gets the Gerrit users emails as a string list.""" | |
server = os.environ.get('GERRIT_SERVER', GERRIT_SERVER) | |
logging.debug('Querying all user accounts from ' + server) | |
text = subprocess.check_output([ | |
'ssh', '-p', '29418', server, 'gerrit', 'gsql', '--format', | |
'JSON_SINGLE', '-c', "'select preferred_email from accounts'"]) | |
accounts_json = json.loads(text) | |
return self.json_to_list(accounts_json) |
OlderNewer