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
# start | |
sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist | |
# stop | |
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist |
sudo dscl . -append /groups/wheel GroupMembership <username> | |
# now `sudo visudo` and remove comment from: %wheel ALL=(ALL) NOPASSWD: ALL |
#define ApplicationDelegate ((AppDelegate *)[[UIApplication sharedApplication] delegate]) | |
#define UserDefaults [NSUserDefaults standardUserDefaults] | |
#define NotificationCenter [NSNotificationCenter defaultCenter] | |
#define SharedApplication [UIApplication sharedApplication] | |
#define Bundle [NSBundle mainBundle] | |
#define MainScreen [UIScreen mainScreen] | |
#define ShowNetworkActivityIndicator() [UIApplication sharedApplication].networkActivityIndicatorVisible = YES | |
#define HideNetworkActivityIndicator() [UIApplication sharedApplication].networkActivityIndicatorVisible = NO | |
#define NetworkActivityIndicatorVisible(x) [UIApplication sharedApplication].networkActivityIndicatorVisible = x | |
#define NavBar self.navigationController.navigationBar |
self.startButton.rac_command = [RACCommand command]; | |
self.stopButton.rac_command = [RACCommand command]; | |
__unsafe_unretained id weakSelf = self; | |
id<RACSignal> tick = [[[[self.startButton.rac_command | |
map:^(id _) { | |
RTAFirstView *strongSelf = weakSelf; | |
// Map each start button click to a new signal that fires every second | |
// and stops when the stop button is clicked. | |
return [[RACSignal interval:1] takeUntil:strongSelf.stopButton.rac_command]; |
self.startButton.rac_command = [RACCommand command]; | |
self.stopButton.rac_command = [RACCommand command]; | |
self.resetButton.rac_command = [RACCommand command]; | |
static const CGFloat interval = 0.01; | |
__unsafe_unretained id weakSelf = self; | |
// Signal id -> Signal Signal Number | |
// Map each click of the start button to a signal that fires at our interval | |
// and stops when the stop button's clicked. | |
id<RACSignal> start = [self.startButton.rac_command map:^(id _) { |
Generate the list yourself:
$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.sdk/System/Library/Frameworks/UIKit.framework/Headers
$ grep UI_APPEARANCE_SELECTOR ./* | \
sed 's/NS_AVAILABLE_IOS(.*)//g' | \
sed 's/NS_DEPRECATED_IOS(.*)//g' | \
sed 's/API_AVAILABLE(.*)//g' | \
sed 's/API_UNAVAILABLE(.*)//g' | \
sed 's/UI_APPEARANCE_SELECTOR//g' | \
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
// | |
// PSPDFThreadSafeMutableDictionary.m | |
// | |
// Copyright (c) 2013 Peter Steinberger, PSPDFKit GmbH. All rights reserved. | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is |
// | |
// _oo0oo_ | |
// o8888888o | |
// 88" . "88 | |
// (| -_- |) | |
// 0\ = /0 | |
// ___/`---'\___ | |
// .' \\| |// '. | |
// / \\||| : |||// \ | |
// / _||||| -:- |||||- \ |