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
<!doctype html> | |
<html> | |
<head> | |
<title data-bind="text: title">App: Loading ...</title> | |
<link rel="stylesheet" id="themeLink" data-bind="attr: { href: selectedTheme().url }" | |
href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/black-tie/jquery-ui.min.css" /> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.4/jquery-ui.js"></script> |
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
# e.g from svn+ssh://username@myrepo.internal | |
svn info | grep URL: | cut -d / -f 3 | cut -d @ -s -f 1 | |
# output: username |
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
source `dirname $BASH_SOURCE`/otherscript.sh |
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
unset OPTSTRING | |
unset OPTIND | |
local opt | |
while getopts "ab:c" opt; do | |
case $opt in | |
a) | |
aSpecified=true | |
;; | |
b) |
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 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 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 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 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
# manually | |
git remote update origin --prune | |
git branch -vv | grep "gone]" | |
git branch -d theBranchName anotherBranch andAnotherBranch | |
# automatically | |
git branch -vv | grep "gone]" | awk '{print $1}' | xargs git branch -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
git gc | |
git count-objects -vH |
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
// Based on https://spectreattack.com/spectre.pdf, sections 3 mainly, 4, 4.3 | |
// Also see: https://webkit.org/blog/8048/what-spectre-and-meltdown-mean-for-webkit/ | |
const array1 = [1, 2, 3]; | |
const array1_size = 3; | |
const array2_size = (64 * 1024) / 8; | |
const array2 = new Array(array2_size); // 8192 empty 8-byte entries = 64KB. 64KB is 256*256 | |
function run() { | |
setup(); |
OlderNewer