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 | |
HEART='♥' | |
if [[ `uname` == 'Linux' ]]; then | |
current_charge=$(cat /proc/acpi/battery/BAT1/state | grep 'remaining capacity' | awk '{print $3}') | |
total_charge=$(cat /proc/acpi/battery/BAT1/info | grep 'last full capacity' | awk '{print $4}') | |
else | |
battery_info=`ioreg -rc AppleSmartBattery` | |
current_charge=$(echo $battery_info | grep -o '"CurrentCapacity" = [0-9]\+' | awk '{print $3}') |
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
vim `eslint --no-eslintrc -f compact --rule no-unused-vars:error 'src/**/*.js' | sed -ne 's/:.*$//p' | uniq` |
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
// Async Chunking or Sync | |
class Batch { | |
constructor(opt) { | |
this.fn = opt.fn; | |
this.transformFn = opt.transformFn || null; | |
this.args = opt.args || []; | |
this.argsIndex = opt.argsIndex || 0; | |
this.dataset = opt.dataset || null; | |
this.start = 0; |
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
var moment = require('moment'); | |
var _ = require('lodash'); | |
function p(i) { | |
return new Promise(resolve => { | |
setTimeout(() => { | |
resolve({id: i}); | |
}, 300) | |
}) | |
} |
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 | |
HEART='♥' | |
if [[ `uname` == 'Linux' ]]; then | |
current_charge=$(cat /proc/acpi/battery/BAT1/state | grep 'remaining capacity' | awk '{print $3}') | |
total_charge=$(cat /proc/acpi/battery/BAT1/info | grep 'last full capacity' | awk '{print $4}') | |
else | |
battery_info=`ioreg -rc AppleSmartBattery` | |
current_charge=$(echo $battery_info | grep -o '"CurrentCapacity" = [0-9]\+' | awk '{print $3}') |
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
# @gf3’s Sexy Bash Prompt, inspired by “Extravagant Zsh Prompt” | |
# Shamelessly copied from https://github.com/gf3/dotfiles | |
default_username='austen' | |
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then | |
export TERM=gnome-256color | |
elif infocmp xterm-256color >/dev/null 2>&1; then | |
export TERM=xterm-256color | |
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
π |
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 VIM ♥♥♥ 20:04 | |
# [ Reset Prefix ] {{{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 | |
function rnum { | |
echo $((RANDOM % $1)) | |
} | |
COWS=("bong" "unipony" "sodomized" "head-in" "vader" "elephant" "tux") | |
VOICES=("Daniel" "Karen") | |
TIMER=10 | |
audio=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
alias ta='tmux attach -t' | |
alias tkss='tmux kill-session -t' | |
alias tksv='tmux kill-server' | |
alias tl='tmux list-sessions' | |
alias tmux=_zsh_tmux_plugin_run | |
alias ts='tmux new-session -s' | |
Bind Key | |
ctrl-a |
NewerOlder