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 bash | |
set -e | |
target_osx=$(sw_vers -productVersion) | |
project_dir=$HOME/aseprite | |
skia_dir=$HOME/deps/skia | |
arch="$(uname -m)" | |
bundle_trial_url=https://www.aseprite.org/downloads/trial/Aseprite-v1.2.40-trial-macOS.dmg |
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
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change. | |
export PATH="$PATH:$HOME/.rvm/bin" | |
source ~/.rvm/scripts/rvm | |
alias rs='rake start' | |
alias open='xdg-open' | |
#function cd() { builtin cd "$@" && ls -G; } | |
export ENDCOLOR="\033[00m"; |
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
autocmd Filetype html setlocal ts=2 sw=2 expandtab | |
autocmd Filetype ruby setlocal ts=2 sw=2 expandtab | |
autocmd Filetype javascript setlocal ts=4 sw=4 sts=0 noexpandtab |
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
# Collatz Conjecture | |
# https://www.youtube.com/watch?v=5mFpVDpKX70 | |
print "Give me a number: " | |
number = gets.chomp.to_i | |
if number == 0 | |
puts "Try again with a non-zero integer." | |
exit | |
end | |
count = 0 | |
while number != 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
#!/usr/bin/env python | |
# coding=UTF-8 | |
# -*- coding: UTF-8 -*- | |
# source: | |
# http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/#my-right-prompt-battery-capacity | |
import math, subprocess | |
p = subprocess.Popen(["ioreg", "-rc", "AppleSmartBattery"], stdout=subprocess.PIPE) | |
output = p.communicate()[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
###################################################################### | |
# A simple script written to find keywords and digits inside # | |
# blobs of hex data, used for some quick and dirty basic protocol # | |
# reverse-engineering. # | |
# # | |
# You can find a given string or digit inside a hex # | |
# in a blob of text. # | |
# Usage: ruby brute.rb <keys_to_find> <paste your hex> # | |
# # | |
# Multiple keys: # |
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 python | |
# coding=UTF-8 | |
# -*- coding: UTF-8 -*- | |
# saved to ~/bin/batcharge.py and from | |
# http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/#my-right-prompt-battery-capacity | |
import math, subprocess | |
p = subprocess.Popen(["ioreg", "-rc", "AppleSmartBattery"], stdout=subprocess.PIPE) | |
output = p.communicate()[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
# vim:ft=zsh ts=2 sw=2 sts=2 | |
# | |
# Based on agnoster's Theme - https://gist.github.com/3712874 | |
# A Powerline-inspired theme for ZSH | |
# | |
# # README | |
# | |
# In order for this theme to render correctly, you will need a | |
# [Powerline-patched font](https://gist.github.com/1595572). | |
# |
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/zsh | |
# Saved in ~/online-check.sh and in a cron job as: | |
# * * * * * ~/online-check.sh | |
local offline=`dig 8.8.8.8 +time=1 +short google.com A | grep -c "no servers could be reached"` | |
if [[ "$offline" == "0" ]]; then | |
rm ~/.offline | |
else | |
touch ~/.offline |
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
EVAL "return redis.call('DEL', unpack(redis.call('KEYS', ARGV[1] .. '*')))" 0 resque: |
NewerOlder