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 | |
set -u | |
# ---------------------------------------------------------- | |
# Helpers | |
function html() { | |
contents="none" | |
case $1 in | |
ok) |
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 | |
set -euo pipefail | |
readonly dot_file="$1" | |
readonly output_file="$2" | |
readonly dot_file_abs=$(readlink -f $dot_file) | |
if [ ! -f $dot_file_abs ] | |
then |
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 | |
patterns="$1" | |
url="$2" | |
echo "$(date) start watch reloading for $url on change to $patterns" | |
watchmedo shell-command --patterns "${patterns}" --command "echo \$(date) \$watch_src_path changed; reload_active_tab_chrome.as '$url'" |
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 escript | |
-export([main/1]). | |
-define(FUNC(F), fun(I) -> F(I) end). % Can't use fun quote_pids/1 in escript :( | |
to_erlang_term(Bin) -> | |
{ok, Scanned, _} = erl_scan:string(binary_to_list(Bin)), | |
{ok, Parsed} = erl_parse:parse_exprs(Scanned), | |
{value, Evaled, []} = erl_eval:exprs(Parsed, []), |
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/osascript | |
-- -*- applescript -*- | |
on run argv | |
set reload_url_pattern to argv | |
tell application "Google Chrome" | |
set windowList to every window | |
repeat with aWindow in windowList |