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
| CT=[ | |
| medley.vandelay.apjobs.models.APPhoto, | |
| medley.vandelay.apjobs.models.APStory, | |
| medley.playlist.models.Artist, | |
| medley.list_o_rama.models.AutomaticList, | |
| medley.extensions.models.weblogs.MedleyBlog, | |
| medley.extensions.models.weblogs.MedleyEntry, | |
| medley.extensions.models.document.MedleyDocument, | |
| medley.events.models.MedleyEvent, | |
| medley.list_o_rama.models.ExternalFeed, |
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
| import os | |
| from storyville.conf.local import * | |
| os.environ['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|sch-n|scp-|sec-|sendox|sgh|sharp|smartphone|spha|v60t|vi600|vk530|vm4050|vodafone|wapper|wildseed|winwap-pro' |
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
| # A few oneliners to backfill the logstash with logs from all the apache servers | |
| # (there server is running in a screen session in my home directory on "django apache admin 1" aka: djaapaadm1) | |
| # Try searching for error at http://djaapaadm1.ddtc.cmgdigital.com:9292/ | |
| # backfill access logs to the listen on port 9293 | |
| for n in {1..10}; do ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no djaapaprd$n.ddtc.cmgdigital.com 'tail -n 10000 /localfs/httpd/logs/*-access_log' | sed '/^$/d;/^==> /d'; done | pv | nc djaapaadm1.ddtc.cmgdigital.com 9293 | |
| # backfill error logs to the listen on port 9294 | |
| for n in {1..10}; do ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no djaapaprd$n.ddtc.cmgdigital.com 'tail -n 10000 /localfs/httpd/logs/*-error_log' | sed '/^$/d;/^==> /d'; done | pv | nc djaapaadm1.ddtc.cmgdigital.com 9294 |
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
| git reset --soft $(/usr/local/bin/git log --format=%H | tail -1); git commit --amend --reset-author -m 'initial' |
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
| [sxz]$ $ es | |
| [^aeioudgkprt]h$ $ es | |
| [^aeiou]y$ y$ ies | |
| $ $ s |
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 pylibcurl import curl; | |
| from private_settings import TWITTER_USERNAME, TWITTER_PASSWORD | |
| url='https://stream.twitter.com/1/statuses/filter.json?track=@%s' % (TWITTER_USERNAME) | |
| userpwd='%s:%s' % (TWITTER_USERNAME, TWITTER_PASSWORD) | |
| while True: | |
| c=curl.Curl(url=url, userpwd=userpwd); | |
| c.perform() |
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 | |
| # A script to generate a spreadsheet of the iOS device UDIDs connected to your developer account | |
| # Copy the Apple Developer Portal cookies with the "cookie.txt export" Chrome plugin, then... | |
| # pbpaste > cookies.txt | |
| # ...then run this script | |
| # The index page has a list of truncated UDIDs with link to a detail page for each. | |
| curl --cookie cookies.txt https://developer.apple.com/ios/manage/devices/index.action | \ |
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
| # Mobile logic to direct users to mobile or full sites | |
| # Enforce destination to not be origin. Interim hack to allow mobile sites to redirect when returning from Akamai. -MH | |
| RewriteCond %{HTTP_HOST} ^origin\. | |
| RewriteRule ^(.*)$ %{HTTP_HOST}$1 [C] | |
| RewriteRule ^origin\.([^/]+)(/.*)$ $2 [C,E=DEST_HOST:$1,PT] | |
| RequestHeader set Host %{DEST_HOST}e env=DEST_HOST | |
| # Do not apply any further rules to lsp., news. or signin. domains | |
| RewriteCond %{HTTP_HOST} ^(lsp|signin|news|lab)\. [NC] |
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 | |
| file=$1 | |
| last=$(tail -n 1 $file) | |
| # if you do this in a chmoded file you have to double the backslash as I have in the next line | |
| sed -i -e '$d' -e "1 i\\ | |
| $last | |
| " $file | |
| # NOTE: for BSD sed (non-gnu, aka: OSX), use: -i '' |
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"?> | |
| <configs xsi:noNamespaceSchemaLocation="../schemas/metadata.xsd" xmlns:cache="uri:akamai.com/metadata/cache/5.0" xmlns:edgeservices="uri:akamai.com/metadata/edgeservices/5.0" xmlns:xalan="http://xml.apache.org/xslt" xmlns:config="uri:akamai.com/metadata/config/5.0" xmlns:network="uri:akamai.com/metadata/network/5.0" xmlns:auth="uri:akamai.com/metadata/auth/5.0" xmlns:match="uri:akamai.com/metadata/match/5.0" xmlns:forward="uri:akamai.com/metadata/forward/5.0" xmlns:comment="uri:akamai.com/metadata/comment/5.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:akamai="uri:akamai.com/metadata/akamai/5.0" xmlns:security="uri:akamai.com/metadata/security/5.0" xmlns:reporting="uri:akamai.com/metadata/reporting/5.0" xmlns:edgecomputing="uri:akamai.com/metadata/edgecomputing/5.0" xmlns:assign="uri:akamai.com/metadata/assign/5.0"> | |
| <akamai:edge-config version="5.0"> | |
| <comment:advanced_defaults.begin/> | |
| <comment:advanced_defaults.end/> | |
| <comment:quickstart_sec |