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
| #!/bin/bash | |
| FILE_GRUB_DEFAULT=/etc/default/grub | |
| FILE_GRUB_CONF=/boot/grub/grub.cfg | |
| FILE_GRUB_BACKUP=.grub.cfg.bak | |
| if [ ! "$(id -u)" = "0" ] | |
| then | |
| echo "Script must be run as root!" | |
| else |
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
| #!/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 |
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
| #!/bin/sh | |
| ./configure CPPFLAGS=-DDEBUG CXXFLAGS="-g -O0" "$@" |
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
| #!/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 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
| #!/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 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
| #!/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 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
| " 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 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
| #!/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 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
| #!/bin/bash | |
| cd ~ | |
| apply () | |
| { | |
| cd "$1" | |
| files=$(echo *) | |
| for f in $files | |
| do |
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
| # 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" |