-
Put the devsync.sh into some sane path, name it short to make it useful (like ~/bin/ds or /usr/local/bin/ds) and make it executable.
-
Designate preferably an empty directory and put
export DEVDIR=/path/to/your/dir
into your shell environment.
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
numid=3,iface=CARD,name='USB Internal Validity' | |
; type=BOOLEAN,access=r-------,values=1 | |
: values=on | |
numid=31,iface=MIXER,name='PCM Out 01 Source' | |
; type=ENUMERATED,access=rw------,values=1,items=15 | |
; Item #0 'Off' | |
; Item #1 'Analogue In 01' | |
; Item #2 'Analogue In 02' | |
; Item #3 'Analogue In 03' | |
; Item #4 'Analogue In 04' |
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
### Keybase proof | |
I hereby claim: | |
* I am blufor on github. | |
* I am blufor (https://keybase.io/blufor) on keybase. | |
* I have a public key ASBK0ySaCkwKE_WLw7mkGi4VASABeaPecP11j1R-FaVnFQo | |
To claim this, I am signing this object: |
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_status() { | |
awk=' | |
function _dels(s) { | |
printf "\033[" code ";31m" s "\033[0m" | |
} | |
function _adds(s) { | |
printf "\033[" code ";32m"s "\033[0m" | |
} |
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
#!/usr/bin/env ruby | |
################### | |
### USER CONFIG ### | |
################### | |
LINT_DISABLED_CHECKS = %w( 80chars | |
documentation | |
single_quote_string_with_variables | |
autoloader_layout | |
ensure_first_param ) |
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 | |
BLOCK_SIZE="16M" | |
DEV=$1 | |
SIZE="`blockdev --getsize64 ${DEV}`" | |
GBSIZE="`echo "scale=2; ${SIZE}/1024^3" | bc`" | |
echo -n "Are you sure you want to wipe ${DEV}? (ENTER to continue, Ctrl+C to cancel):" | |
read |
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 | |
DESTDIR=/usr/local/bin | |
export IFS=$'\n' | |
for app in `cat $HOME/.local/share/applications/chrome-* | awk '/^(Exec|Name)/' | sed -r 's/^(Exec|Name)\=//' | sed '$!N;s/\n/|/' | grep -v Launcher`; do | |
app_name=`echo $app | awk -F\| '{ print $1 }'` | |
app_exec=`echo $app | awk -F\| '{ print $2 }'` | |
sanitized_app_name=`echo $app_name | tr "[:upper:]" "[:lower:]" | tr " " "_" | sed -r -e 's/^([a-z0-9_]+).*$/\1/' -e 's/_$//' | awk -F_ '{ if ($1 == "google") { print $0 } else { print $1 } }'` | |
sudo sh -c "echo \"#!/bin/bash\n${app_exec}\n\" > ${DESTDIR}/$sanitized_app_name; chmod a+x ${DESTDIR}/$sanitized_app_name" | |
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
#!/usr/bin/env ruby | |
require 'csv'; | |
require 'json'; | |
flavors = CSV.read("flavors", { col_sep: ";"}) | |
instances = CSV.read("inst", { col_sep: ";"}) | |
puts "instance uuid;instance name;flavor;vcpus;memory (MB);root disk (GB);hypervisor" |
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 parse_yaml { | |
local prefix=$2 | |
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034') | |
sed -ne "s|^\($s\):|\1|" \ | |
-e "s|^\($s\)\($w\)$s:$s[\"']\(.*\)[\"']$s\$|\1$fs\2$fs\3|p" \ | |
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | | |
awk -F$fs '{ | |
indent = length($1)/2; | |
vname[indent] = $2; | |
for (i in vname) {if (i > indent) {delete vname[i]}} |
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 | |
if [ ".$1" = "." ]; then | |
echo "Syntax: $0 <device>"; | |
exit | |
fi | |
device=$1 | |
echo $device |grep "^/dev/sd[a-z]$" >/dev/null |