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/sh | |
DATEFILE=/tmp/`date +"%s"`.html | |
curl -s http://outage.cl-p.com/outage/mobile.aspx > $DATEFILE | |
rm outages.csv 2>/dev/null | |
#cat $DATEFILE | grep '<table' | sed -e 's/.*<thead><tr><th>//g' -e 's/<\/th><\/tr><\/thead>.*//g' -e 's/<\/th><th>/,/g' >> outages.csv | |
cat $DATEFILE | grep '<table' | sed -e 's/.*<\/thead>//g' -e 's/<tfoot>.*//g' -e 's/<tr><td>//g' -e 's/<\/td><td>/|/g' -e 's/<\/td><\/tr>/@/g' -e 's/@$//g' | tr '@' "\n" >> outages.csv |
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
tell application "System Preferences" to activate | |
tell application "System Events" | |
tell process "System Preferences" | |
click menu item "Sound" of menu "View" of menu bar 1 | |
-- set output | |
click radio button "Output" of tab group 1 of window "Sound" | |
set theRows to every row of table 1 of scroll area 1 of ¬ | |
tab group 1 of window "Sound" | |
repeat with aRow in theRows | |
if (value of text field 1 of aRow as text) ¬ |
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/sh | |
ps ax | grep jekyll | grep -v grep | awk '{ print $1 }' | xargs kill | |
jekyll & | |
sleep 1 | |
open http://localhost:4000 |
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 ~/Desktop/crash1.log | awk '{ print $3 }' | xargs atos -arch armv7 -o MapBox.app.dSYM/Contents/Resources/DWARF/MapBox |
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 | |
# | |
# (Above line comes out when placing in Xcode scheme) | |
# | |
API_TOKEN=<TestFlight API token here> | |
TEAM_TOKEN=<TestFlight team token here> | |
SIGNING_IDENTITY="iPhone Distribution: Development Seed" | |
PROVISIONING_PROFILE="${HOME}/Library/MobileDevice/Provisioning Profiles/MapBox Ad Hoc.mobileprovision" | |
#LOG="/tmp/testflight.log" |
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
NSArray *colorNames = [NSArray arrayWithObjects:@"red", @"blue", @"yellow", @"green", @"brown", @"purple", @"cyan", @"orange", @"magenta", nil]; | |
NSMutableArray *madeColors = [NSMutableArray array]; | |
for (int c = 0; c < [colorNames count]; c++) | |
[madeColors addObject:[[UIColor class] performSelector:NSSelectorFromString([NSString stringWithFormat:@"%@Color", [colorNames objectAtIndex:c]])]]; |
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
LoadModule dav_svn_module /opt/subversion/lib/svn-apache/mod_dav_svn.so | |
LoadModule authz_svn_module /opt/subversion/lib/svn-apache/mod_authz_svn.so | |
<Location "/svn"> | |
DAV svn | |
SVNParentPath /usr/local/svnroot | |
AuthType Basic | |
AuthName "Subversion Repository" | |
AuthUserFile /etc/apache2/other/htpasswd | |
Require valid-user | |
</Location> |
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
- (void)moveBy:(CGSize)delta | |
{ | |
// Adjust delta as necessary to constrain latitude, but not longitude. | |
// | |
// This is largely borrowed from -[RMMapView setConstraintsSW:NE:] and -[RMMapView moveBy:] | |
// | |
RMProjectedRect sourceBounds = [self.mercatorToScreenProjection projectedBounds]; | |
RMProjectedSize XYDelta = [self.mercatorToScreenProjection projectScreenSizeToXY:delta]; | |
CGSize sizeRatio = CGSizeMake(((delta.width == 0) ? 0 : XYDelta.width / delta.width), |
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
// check that popover won't try to move off-screen; dismiss if so | |
// | |
CGFloat pX = newAttachPoint.x; | |
CGFloat pY = newAttachPoint.y; | |
CGFloat pWidth = balloon.popoverContentSize.width; | |
CGFloat pHeight = balloon.popoverContentSize.height; | |
CGFloat mWidth = map.bounds.size.width; | |
CGFloat mHeight = map.bounds.size.height; | |
UIPopoverArrowDirection d = balloon.popoverArrowDirection; |
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
grep github ./.git/config | sed -e 's/^.*\(github.com.*\)\.git$/\1/' -e 's/.*github\.com:*\/*/https:\/\/github.com\//' | xargs open |