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
DEBUG_DOC_ID = "Replace this with the ID of document to write debug output to"; | |
function print_r (array) { | |
var analyze = function(array) { | |
return format(array, 0); | |
} | |
var format = function(obj, depth) { | |
var str = ""; | |
var padder = ""; | |
var PAD = " "; |
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
# Outputs without a newline and overwrites anything that was already on the last line of | |
# the terminal | |
overwrite () | |
{ | |
output="$1" | |
if [ -z "$output" ] | |
then | |
read output | |
fi | |
printf "\r" |
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 | |
cd ~ | |
apply () | |
{ | |
cd "$1" | |
files=$(echo *) | |
for f in $files | |
do |
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 | |
# | |
# ~/.bashcolors | |
# Defines variables to hold shell text escape sequences | |
# | |
# remember, when using in a prompt, put escape code in between \[ and \] so | |
# terminal can calculate width of prompt correctly. | |
TEXT_reset='\e[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
" Ensure that sourcing twice doesn't set autocmds twice | |
autocmd! | |
" Remember things on exit | |
" 'x : save marks in up to x last files | |
" "x : save up to x lines for each register | |
" :x : save up to x lines of command history | |
" % : save and restore buffer list | |
" nX : save viminfo in path X | |
set viminfo='10,\"100,:20,%,n~/.viminfo |
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 | |
sensor_data=$(sensors | tail -n +3 | sed -e 's/^.*: *+//' -e 's/\.\([0-9]\).*/.\1/' | xargs temp_stats | tail -n +2) | |
sensor_min=$(echo $sensor_data | cut -d ' ' -f 1) | |
sensor_max=$(echo $sensor_data | cut -d ' ' -f 2) | |
sensor_avg=$(echo $sensor_data | cut -d ' ' -f 3) | |
echo "$sensor_avg/$sensor_max" |
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 | |
TEMP_DIR=".git_annhilate_temp" | |
if [[ $3 == "" ]] | |
then | |
echo Usage: $0 ssh-repo-url branch file-to-delete | |
else | |
F=0 #failure check | |
REPO_URL=$1 |
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 | |
############################################################################## | |
# NAME # | |
# dwc - 'Directory Word Count' - print and format newline, word, and # | |
# byte counts for each file. # | |
# # | |
# SYNOPSIS # | |
# dwc [OPTION]... [FILE]... # | |
# dwc [OPTION]... --files0-from=F # |
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/sh | |
./configure CPPFLAGS=-DDEBUG CXXFLAGS="-g -O0" "$@" |
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 | |
# Place in ~/bin | |
monitercmd="upower -i /org/freedesktop/UPower/devices/battery_BAT1" | |
powerstatus=$($monitercmd) | |
percent= | |
if echo $powerstatus | grep -q "^failed to set path" | |
then | |
percent="N/A" | |
else |
OlderNewer