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
export ORIG_GEM_PATH=${GEM_PATH:-} | |
export ORIG_GEM_HOME=${GEM_HOME:-} | |
export ORIG_PATH=${PATH} | |
omg() { | |
if [[ "$1" =~ "^h(elp)?\$" ]]; then | |
echo "Usage: omg [h|help|r|reset]" | |
elif [[ "$1" =~ "^r(eset)?\$" ]]; then | |
if [[ -z "$ORIG_GEM_HOME" ]]; then | |
unset GEM_HOME |
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
#!/usr/bin/env zsh | |
#### CONFIG ####################################################################################### | |
#### !!! REQUIRED !!! Put your imgur API key in the `IMGUR_KEY` environment variable. | |
#### Image format | |
# local image_format="jpg" | |
#### Show cursor (only in full screen screenshots) |
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
#!/usr/bin/env zsh | |
commandIsValid() { | |
cmds=( "h" "help" "l" "list" "z" "zip" "rm" "remove" ) | |
local cmd="$1" | |
for e in $cmds[@]; do | |
if [[ "$e" == "$cmd" ]]; then | |
return 0 | |
fi |
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
#!/usr/local/bin/fish | |
set -l new_commit_message_file "/tmp/gishtank_temporary_commit_message" | |
echo " " | tr -d " " > $new_commit_message_file | |
if test (count (cat $argv[1] | tail -n +2 | /usr/bin/grep "^[^#]")) -le 21 -a (count (cat $argv[1])) -lt 51 | |
if test (count (cat $argv[1] | tail -n +2 | /usr/bin/grep "^[^#]")) -gt 0 | |
echo "#" >> $new_commit_message_file | |
echo "# Commit diff (Status at EOF)" >> $new_commit_message_file | |
echo "#" >> $new_commit_message_file |
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
#!/usr/local/bin/fish | |
function chgems --description="Gemsets without RVM" | |
set -gx CHGEMS_VERSION "0.3.3" | |
switch "$argv[1]" | |
case "-V" "--version" | |
echo "chgems $CHGEMS_VERSION" | |
return | |
case "-h" "--help" |
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
ack | |
aria2 | |
autojump | |
cmake | |
ctags | |
dtrx | |
elinks | |
ghi | |
git | |
gti |
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 | |
(ssh <user>@<ip> -o PermitLocalCommand=no \ | |
": > .irssi/fnotify ; tail -f .irssi/fnotify " | \ | |
while read heading message; do \ | |
growlnotify -s -t "${heading}" -m "${message}"; \ | |
done)& |
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
# Touch n files with random names | |
randtouch() { | |
# A number of files to create must be specified | |
if [[ -n "$1" ]] && [[ "$1" = "${1%%[!0-9]*}" ]]; then | |
# Check if an extension was specified | |
if [[ -n "$2" ]]; then | |
# Extensions can only contain 2-10 letters | |
if [[ "$2" =~ ^\\.?[a-z]{2,10}$ ]]; then |
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
#!/usr/local/bin/zsh | |
if [[ $1 = "auth" ]]; then | |
echo "Authorizing this script with Skype..." | |
osascript <<-APPLESCRIPT | |
tell application "Skype" | |
set onlineStatus to send command "GET USER " & "$contact" & " ONLINESTATUS" script name "getType" | |
end tell | |
set status to word 4 of onlineStatus |
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
tell application "Skype" to activate | |
tell application "Skype" | |
delay 2 | |
tell application "System Events" to keystroke return | |
end tell | |
tell application "Skype" to get URL "skype:<skype_handle>?call" |