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 | |
| log="/tmp/$(basename $0).log" | |
| # Truncate existing log | |
| echo -n > $log | |
| echo the $0 script was called with... | tee -a $log | |
| for a in "$@"; do | |
| echo $((++i)) $a | tee -a $log | |
| done |
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
| /\ | |
| ⎛ ⊗ ⊗ ⎞ | |
| ⎜ ⋁⋁⋁⋁ ⎟ | |
| ⎝ ⋀⋀⋀⋀ ⎠ |
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
| # Define the MOBILE_PATTERN (for user agent detection) ONLY for pages who are NOT black listed from mobile. (TODO: Try using a whitelist instead. Would probably be shorter.) | |
| RewriteCond %{REQUEST_URI} !^/(ads|alerts|answers|audioclips|bands|categories|categories|events|documents|drinkspecials|events|features|forums|gallery|instruments|maps|mp3|lsp|onthestreet|photo|photos|galleries|photos|places|playlists|podcasts|polls|pr|qa|questionnaires|recipes|restaurants|restaurants|specials|search|songs|special_coverage|staff|stories|traffic|tumble|videos) [NC] | |
| RewriteRule .* - [E=MOBILE_PATTERN:iphone|ipod|android|blackberry|symbian|nokia|sonyericsson|sie-|opera\ mini|portalmmm/|windows\ ce|up.browser|up.link|802sh|alcatel-|amoi-|attws|au-mic|audiovox|avantgo|benq|cdm-|ericsson|ericy-|gs308|hitachi-p300|htc-|i-2100|inn|kwc-|lg-|lg/u|lge-|lge/u|lowestcd|mo0|mobilephone|mot-|motorola|n5-10|nec-|opwv|owg1|palm|panasonic|pg-c|philips|pls|pm-|pn-215|profile/midp|qci-|rl-|rpt-httpclient|sagem|samsung|sanyo|sch-a |
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
| tests=3 | |
| kilobytes=102400 | |
| commands=(md5 shasum) | |
| count=0 | |
| test_num=0 | |
| time_file=/tmp/time.out | |
| file_base=/tmp/rand | |
| while [[ test_num -lt tests ]]; do | |
| ((test_num++)) |
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 python | |
| """ | |
| ignore_moves.py v0.2 | |
| Filter relocated lines from a unified diff format stream. | |
| Offered under the terms of the MIT License at github.com | |
| Taken from http://stackoverflow.com/questions/1380333/ | |
| """ | |
| import sys | |
| from optparse import OptionParser |
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
| sudo ssh -g -L 0.0.0.0:443:localhost:6697 rbronosky@bastion2.ddtc.cmgdigital.com |
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
| # oneliner | |
| # grep_header(){ header_pattern="$1"; search_pattern="$2"; awk "/$header_pattern/ {h=\$0; } /$search_pattern/{if(h){print h; h=\"\";}; print \$0;}"; } |
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
| # Launch screen/tmux. Start this in the background while you try your other fixes. See which works first. | |
| # Skip this if you want to try to fix your current venv | |
| create_environment; sv; load_prod_db; django-admin.py loaddata local_site_list | |
| # In case your jellydoughnut wasn't totally up to date | |
| ensure_ro_db_user | |
| # Migration Whack-a-Mole | |
| django-admin.py migrate sitesettings |
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
| From: http://twitter.com/#!/datagrok/status/117094906115264513 | |
| /^(?::([^ ]+) )?([^ ]+)((?: [^: ][^ ]*){0,14})(?: :?(.*))?$/ | |
| /^ $/ | |
| match the left and right boundaries of the string (The entire string must be described by the pattern) | |
| (?::([^ ]+) )? | |
| Optional: No Back Reference*: a colon, one or more non-space chars, a space |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <feed xmlns="http://www.w3.org/2005/Atom"> | |
| <title>www.wokv.com facebook</title> | |
| <link rel="self" type="application/atom+xml" href="http://www.wokv.com/breaking-news/facebook-feed/"/> | |
| <link rel="hub" href="http://cmgdigitalhub.superfeedr.com/"/> | |
| <updated>2011-10-04T10:08:00.609307-04:00</updated> | |
| <id>tag:www.wokv.com,2011:/breaking-news/facebook-feed/cmg@da752b67477031ae2ef09c06213463d9bccbc6f145b41def15bcb6e0</id> | |
| <author><name>www.wokv.com</name></author> | |