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
awk 'BEGIN{s="/inet/tcp/80/0/0";"pwd" |& getline;r=$0;while((s |& getline) > 0){gsub(/[\r\n]/,"");if($0 ~ /^\s*$/){c="cat " r path;printf "HTTP/1.0 200 OK\r\n\r\n" |& s;while((c |& getline) > 0){print |& s}close(c);close(s)}else if($0 ~ /HTTP/){print;path=$2}}}' |
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
find . -type f -name '*.php' | xargs awk '/catch \(.*Exception/ {getline; if ($0 ~/^[ \\t]*?}[ \\t]*?$/) { print FILENAME ":" FNR ":" $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
ls -F | grep / | tr -d '/' | xargs knife cookbook test -o . |
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
diff -u <(psql DB_NAME -c "select * from pg_current_xlog_location()" -t) <(psql DB_NAME -c "select flush_location from pg_stat_replication" -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
$ cat <<EOF >> /Applications/LimeChat.app/Contents/Themes/Limelight.css | |
.line[type=join] { display:none; } | |
.line[type=quit] { display:none; } | |
.line[type=mode] { display:none; } | |
.line[type=part] { display:none; } | |
.line[type=nick] { display:none; } | |
EOF |
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
$ cat /Applications/IntelliJ\ IDEA\ 12.app/bin/idea.vmoptions | |
-Xms1024m | |
-Xmx2048m | |
-XX:MaxPermSize=512m | |
-XX:ReservedCodeCacheSize=96m | |
-XX:+UseCodeCacheFlushing | |
-XX:+UseCompressedOops |
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
2014-04-13 00:31:56:498 1132 17e4 AU <<## SUBMITTED ## AU: Search for updates [CallId = {D58E6635-C702-4748-939A-A2EF7D783F12}] | |
2014-04-13 00:31:56:498 1132 145c Agent ************* | |
2014-04-13 00:31:56:498 1132 145c Agent ** START ** Agent: Finding updates [CallerId = AutomaticUpdates] | |
2014-04-13 00:31:56:498 1132 145c Agent ********* | |
2014-04-13 00:31:56:498 1132 145c Agent * Online = No; Ignore download priority = No | |
2014-04-13 00:31:56:498 1132 145c Agent * Criteria = "IsInstalled=0 and DeploymentAction='Installation' or IsPresent=1 and DeploymentAction='Uninstallation' or IsInstalled=1 and DeploymentAction='Installation' and RebootRequired=1 or IsInstalled=0 and DeploymentAction='Uninstallation' and RebootRequired=1" | |
2014-04-13 00:31:56:498 1132 145c Agent * ServiceID = {9482F4B4-E343-43B6-B170-9A65BC822C77} Windows Update | |
2014-04-13 00:31:56:498 1132 145c Agent * Search Scope = {Machine} | |
2014-04-13 00:31:56:857 1132 1374 AU WARNING: Returning due to error from GetDownloadProgressUx, error = 0x802 |
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
for branch in $(git for-each-ref --format='%(refname)' refs/heads/ | sed 's|refs/heads/||'); do desc=$(git config branch.$branch.description); if [[ "$branch" == "$(git rev-parse --abbrev-ref HEAD)" ]]; then branch="* \033[0;32m$branch\033[0m"; else branch=" $branch"; fi; echo -e "$branch \033[0;36m$desc\033[0m"; done |
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
curl -I $(pbpaste) | grep location | cut -d' ' -f2 | tr -d '\r' | xargs -I{} open {} |
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
$ bash --version | |
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin15) | |
Copyright (C) 2007 Free Software Foundation, Inc. | |
$ declare -A test_ | |
$ test_["hoge"]="moge" | |
$ echo ${test_["hoge"]} | |
moge |
OlderNewer