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
SSH_ENV="$HOME/.ssh/environment" | |
# start the ssh-agent | |
function start_agent { | |
echo "Initializing new SSH agent..." | |
# spawn ssh-agent | |
ssh-agent | sed 's/^echo/#echo/' > "$SSH_ENV" | |
echo succeeded | |
chmod 600 "$SSH_ENV" | |
. "$SSH_ENV" > /dev/null |
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
/// <reference path="require.js" /> | |
!function (window) { | |
var defines = [], | |
moduleUrls = [], | |
oldDefine = window.define, | |
oldRequire = window.require, | |
oldLoad = requirejs.load; | |
var loadEvent = document.createEvent("event"); |
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
lftp hostname <<SCRIPT | |
put ~/myfile.txt | |
quit | |
SCRIPT | |
echo "now carry on with script (check return code etc.)" |
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
# in case of empty dir | |
shopt -s nullglob | |
local fullPath | |
local fileName | |
for fullPath in directory/* | |
do | |
fileName=`baseName $fullPath` | |
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
source `dirname $BASH_SOURCE`/otherscript.sh |
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
# $1 is the identifier | |
local idStart=`echo $1 | cut -c 1` | |
local idEnd=`echo $1 | cut -c 2-` | |
local idComplete="[$idStart]$idEnd" | |
ps -f -u $USER | grep -i "identifier=$idComplete" | awk '{ print $2}' |
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
unset OPTSTRING | |
unset OPTIND | |
local opt | |
while getopts "ab:c" opt; do | |
case $opt in | |
a) | |
aSpecified=true | |
;; | |
b) |
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
# e.g from svn+ssh://[email protected] | |
svn info | grep URL: | cut -d / -f 3 | cut -d @ -s -f 1 | |
# output: username |
NewerOlder