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 | |
# stolen from now defunct http://wiki.sysconfig.org.uk/display/howto/Convert+Citrix+XenServer+images+to+plain+Xen | |
# | |
# To summarize the .xva format: | |
# - it's a tar file | |
# - it contains a folder | |
# - the folder contains chunks of 1MB each | |
# - they can be concatenated, but blank space needs to be filled | |
dd if=/dev/zero of=blank bs=1024 count=1k |
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
# get current branch in git repo | |
function parse_git_branch() { | |
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'` | |
if [ ! "${BRANCH}" == "" ] | |
then | |
STAT=`parse_git_dirty` | |
echo "[${BRANCH}${STAT}]" | |
else | |
echo "" | |
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
# convert from pfx to passwordless key/crt chain | |
# based on https://gist.github.com/ericharth/8334664 | |
# params | |
PFX="hostname.pfx" | |
PASSWORD="pfxpassword" | |
OUT="hostname-2018" | |
# key | |
openssl pkcs12 -in $PFX -password pass:$PASSWORD -nodes -nocerts -out $OUT.key |
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
# lsusb -d 1871:7670 -v | |
Bus 001 Device 126: ID 1871:7670 Aveo Technology Corp. | |
Device Descriptor: | |
bLength 18 | |
bDescriptorType 1 | |
bcdUSB 2.00 | |
bDeviceClass 239 Miscellaneous Device | |
bDeviceSubClass 2 | |
bDeviceProtocol 1 Interface Association |
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
Show hidden characters
{ | |
"working_dir": "${project_path:${folder}}", | |
"shell_cmd": "mvn -fae clean install" | |
} |
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
package main | |
import ( | |
"fmt" | |
"math/big" | |
"sync" | |
) | |
func runInThread(wg *sync.WaitGroup, startFrom int64, numOfIterations int64) { | |
defer wg.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
cat build.gradle\ | |
| awk '{$1=$1};1'\ | |
| grep -i "compile "\ | |
| sed -e "s/^compile //Ig" -e "s/^testCompile //Ig"\ | |
| sed -e "s/\/\/.*//g"\ | |
| sed -e "s/files(.*//g"\ | |
| grep -v ^$\ | |
| tr -d "'"\ | |
| sed -e "s/\([-_[:alnum:]\.]*\):\([-_[:alnum:]\.]*\):\([-+_[:alnum:]\.]*\)/<dependency>\n\t<groupId>\1<\/groupId>\n\t<artifactId>\2<\/artifactId>\n\t<version>\3<\/version>\n<\/dependency>/g" |
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 | |
# Author: Shirish Padalkar (https://twitter.com/_Garbage_) | |
if [ "$#" -ne 1 ]; then | |
echo "Usage: $0 infoq_presentation_url" | |
exit 1 | |
fi | |
url_with_spaces=`curl -A "Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10" $1 | grep "<source src=" | tr -dc "[:print:]"` |
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
# diff -Naur wfcmgr.old wfcmgr | |
--- wfcmgr.old 2013-07-25 15:49:31.180136647 +0200 | |
+++ wfcmgr 2013-07-25 15:50:10.153028280 +0200 | |
@@ -143,7 +143,7 @@ | |
if [ -f $HOME/.ICAClient/.eula_accepted ] | |
then | |
# EULA has been accepted on a previous occasion | |
- exec $ICAROOT/wfcmgr.bin $* | |
+ exec $ICAROOT/wfcmgr.bin $1 $2 "$3" | |
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
config_description=UAE default configuration | |
config_hardware=false | |
config_host=false | |
config_version=0.8.29 | |
unix.rom_path=~/ | |
unix.floppy_path=~/ | |
unix.hardfile_path=~/ | |
unix.savestate_path=~/ | |
unix.cpu_idle=0 | |
amd64.use_tsc=yes |