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
// Usage: | |
// ------ | |
// /* add the action somewhere: */ | |
// phoneTextField.addTarget(self, action: #selector(updatePhoneFormat), for: .editingChanged) | |
// /* implement the update action: */ | |
// func updatePhoneFormat() { phoneTextField.formatPhoneNumber() } | |
import UIKit | |
extension String { |
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
set-option -g default-shell /bin/zsh | |
set -g mouse on | |
# remove the 1-sec delay after pressing 'escape' | |
set -sg escape-time 0 | |
### Appearance Changes | |
# status line |
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
set -o vi | |
export CLICOLOR=1 | |
export LSCOLORS=Exfxcxdxbxegedabagacad | |
export GREP_OPTIONS='--color-auto' | |
export PS1='\[\e[0;32m\]\u\[\e[m\] \[\e[0;36m\]\W\[\e[m\] \[\e[0;32m\]\$\[\e[m\] \[\e[0;37m\]' |
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
class Liblouisutdml < Formula | |
homepage "http://liblouis.org" | |
url "https://code.google.com/p/liblouisutdml/", :using => :hg, :tag => "tip" | |
sha1 "" | |
version "tip" | |
depends_on "automake" | |
depends_on "autoconf" | |
depends_on "libtool" | |
depends_on "pkg-config" |
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
class Liblouis < Formula | |
homepage "http://liblouis.org" | |
url "https://github.com/liblouis/liblouis.git", :using => :git, :tag => "v2.6.2" | |
sha256 "" | |
depends_on "autoconf" | |
depends_on "automake" | |
depends_on "libtool" | |
depends_on "texinfo" |
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 | |
# A script to monitor uptime of websites, | |
# and notify by email if a website is down. | |
SITES="ADD COMMA-SEPARATED WEBSITES HERE" | |
EMAILS="ADD COMMA-SEPARATED EMAILS HERE" | |
for SITE in $(echo $SITES | tr "," " "); do | |
if [ ! -z "${SITE}" ]; then | |
RESPONSE=$(curl -s --head $SITE) | |
if echo $RESPONSE | grep "200 OK" > /dev/null |
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 | |
# itcingest.sh | |
# pulls data from iTunes Connect | |
set +x #quiet things down | |
# Note: the below iTCdir MUST include Autoingestion.class from Apple. If you don't | |
# have it, you can download it here: apple.com/itunesnews/docs/Autoingestion.class.zip | |
# (you also need Java installed. On OSX it'll prompt you to install it if you don't.) |
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 | |
# | |
# Replaces a string from all filenames in the sourcedir. | |
# If the second argument is empty, it will simply remove the string. | |
sourcedir="." | |
stringToChange="$1" | |
replacementString="$2" | |
cd "$sourcedir" |
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 | |
# Batch process png to pvr conversion | |
# using PVRTexTool Command-line tool | |
#take all files of this type: | |
filetype="png" | |
#take them from here: | |
sourcedir="./" | |
#put them here: |
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
#aliases | |
alias ..="cd .." | |
alias ...="cd ..; cd .." | |
alias la="ls -a" | |
# Get readable list of network IPs | |
alias ips="ifconfig -a | perl -nle'/(\d+\.\d+\.\d+\.\d+)/ && print $1'" | |
alias myip="dig +short myip.opendns.com @resolver1.opendns.com" | |
alias flush="dscacheutil -flushcache" # Flush DNS cache |
NewerOlder