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 | |
max_tries=3 | |
devices=() | |
devices_ids=() | |
echo 'restarting bluetooth service.' | |
blueutil -p 0 && sleep 1 && blueutil -p 1 | |
echo 'waiting bluetooth service to be restored.' |
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 bash | |
read -r -d '' usage << EOM | |
Usage: | |
gh-deploy-clone user/repo [ENVIRONMENT] | |
EOM | |
[ -z "$1" ] && echo && echo "$usage" && echo && exit 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
# converting back and forth between (excel) spreadsheets column name / alpha and column number / index | |
# by Rafael Belvederese, inpired by this thread: | |
# http://stackoverflow.com/questions/22708/how-do-i-find-the-excel-column-name-that-corresponds-to-a-given-integer | |
def alpha_to_index(alpha) | |
alpha.upcase! | |
if alpha.length == 1 | |
return alpha.bytes.to_a[0] - 65 | |
elsif alpha.length != 0 | |
return ((alpha_to_index(alpha[0]) + 1) * (26 ** (alpha.length - 1))) + alpha_to_index(alpha[1..-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
package { | |
import flash.display.StageScaleMode; | |
import flash.display.DisplayObject; | |
import flash.display.Loader; | |
import flash.display.Sprite; | |
import flash.display.StageAlign; | |
import flash.events.Event; | |
import flash.events.ProgressEvent; | |
import flash.net.URLRequest; | |
import flash.text.TextField; |