a.k.a. what to do when your ISP starts blocking sites :(
Set the SOCKS proxy to local SSH tunnel
networksetup -setsocksfirewallproxy "Ethernet" localhost 8080
To clear the domain and port
#!/bin/sh | |
# Create a RAM disk with same perms as mountpoint | |
# Script based on http://itux.idev.pro/2012/04/iservice-speed-up-your-xcode-%D0%BD%D0%B5%D0%BA%D0%BE%D1%82%D0%BE%D1%80%D1%8B%D0%B5-%D1%81%D0%BF%D0%BE%D1%81%D0%BE%D0%B1%D1%8B/ with some additions | |
# Usage: sudo ./xcode_ramdisk.sh start | |
USERNAME=$(logname) | |
TMP_DIR="/private/tmp" | |
RUN_DIR="/var/run" | |
SYS_CACHES_DIR="/Library/Caches" |
Assuming that you don't care which NSManagedObjectContext is used, and you just want to make some changes and save them in the background, use the following method. 90% of the time, this is what you'll want.
NSManagedObjectSubclass *myObject = [NSManagedObjectSubclass MR_findFirst];
[MagicalRecord saveWithBlock:^(NSManagedObjectContext *localContext) {
#include <math.h> | |
#include "CLLocation.h" //requires Core Location Framework | |
- (CLLocationCoordinate2D)convertToLatLongFromEastings:(double)E andNorthings:(double *)N { | |
//E, N are the British national grid coordinates - eastings and northings | |
double a = 6377563.396; //The Airy 180 semi-major and semi-minor axes used for OSGB36 (m) | |
double b = 6356256.909; | |
double F0 = 0.9996012717; |
// | |
// UIImageCreateUsingBlock.m | |
// | |
// Copyright (c) 2013 Zachary Waldowski. | |
// Licensed under MIT - Provided as-is. | |
// | |
#import <UIKit/UIKit.h> | |
#import <CoreGraphics/CoreGraphics.h> |
ACTION | |
AD_HOC_CODE_SIGNING_ALLOWED | |
ALTERNATE_GROUP | |
ALTERNATE_MODE | |
ALTERNATE_OWNER | |
ALWAYS_SEARCH_USER_PATHS | |
ALWAYS_USE_SEPARATE_HEADERMAPS | |
APPLE_INTERNAL_DEVELOPER_DIR | |
APPLE_INTERNAL_DIR | |
APPLE_INTERNAL_DOCUMENTATION_DIR |
NSURLConnection | NSURLSession | |
------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------- | |
NSURLConnectionDelegate connectionShouldUseCredentialStorage: | | |
------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------- | |
NSURLConnectionDelegate connection:willSendRequestForAuthenticationChallenge: | NSURLSessionDelegate URLSession:didReceiveChallenge:completionHandler: | |
| N |
I am now updating these at https://github.com/oobrien/vis/tree/master/tube/data - specifically https://github.com/oobrien/vis/tree/master/tube/data/tfl_lines.json and https://github.com/oobrien/vis/tree/master/tube/data/tfl_stations.json
exports.lines = { | |
"bakerloo": "Bakerloo", | |
"central": "Central", | |
"circle": "Circle", | |
"district": "District", | |
"hammersmith-city": "Hammersmith & City", | |
"jubilee": "Jubilee", | |
"metropolitan": "Metropolitan", | |
"northern": "Northern", | |
"piccadilly": "Piccadilly", |
SELECT pods.name, stats_metrics.download_total, stats_metrics.download_week, stats_metrics.app_total, stats_metrics.app_week FROM stats_metrics JOIN pods ON stats_metrics.pod_id = pods.id ORDER BY app_total DESC LIMIT 300; |