This will let you access any google owned site. This includes: youtube, google cache, google translate, google search, gmail, google news, etc.
- Install the HTTPS Everywhere extension
- Add these rules to your /etc/hosts file
- (NSURL *)URLWithString:(NSString *)string andQueryValuesForKeys:(NSString *)value, ... { | |
if (!value) { | |
return [NSURL URLWithString:string]; | |
} | |
NSMutableString *queryString = [NSMutableString string]; | |
NSString *argument = nil; | |
NSUInteger argumentCount = 0; | |
va_list argumentList; |
#!/bin/sh | |
# | |
# Iconizer shell script by Steve Richey (srichey@floatlearning.com) | |
# Modified by Rich Ellis (rich@richellis.net) based on contributions on Github from crishoj, giria | |
# https://gist.github.com/steverichey/8493f3bd31ae71a9c933/forks | |
# | |
# This is a simple tool to generate all necessary app icon sizes and the JSON file for an *EXISTING* Xcode project from one file. | |
# To use: specify the path to your vector graphic (PDF format) and the path to your Xcode folder containing Images.xcassets | |
# Example: sh iconizer.sh MyVectorGraphic.pdf MyXcodeProject |
import UIKit | |
#if targetEnvironment(simulator) | |
@_silgen_name("UIAnimationDragCoefficient") func UIAnimationDragCoefficient() -> Float | |
func simulatorDragCoefficient() -> CFTimeInterval { | |
let drag = UIAnimationDragCoefficient() | |
if drag > 1 { | |
return CFTimeInterval(drag) | |
} | |
return 1 |
After spending the better part of the month implementing date support | |
in RethinkDB, Mike Lucy sent the team the following e-mail. It would | |
have been funny, if it didn't cause thousands of programmers so much | |
pain. Read it, laugh, and weep! | |
----- | |
So, it turns out that we're only going to support dates between the | |
year 1400 and the year 10000 (inclusive), because that's what boost | |
supports. |
/* | |
You can use this to call deprecated methods without warnings (supporting old sdk's for example) | |
or, you can use it in place of performSelector: where you need non-object params, or multiple | |
params. | |
ie: ... | |
int result = 0; | |
int index = 12; | |
NSArray *array = myArray; |
Method cascades offer a method-based counterpart to functional chaining. In functional chaining, partial results pass from one step to the next. In cascades, object scope is maintained through a series of sequential calls. Both approaches support fluent interfaces, providing readable streamlined code.
#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 |
#import <UIKit/UIKit.h> | |
#import <ImageIO/ImageIO.h> | |
#import <MobileCoreServices/MobileCoreServices.h> | |
static UIImage *frameImage(CGSize size, CGFloat radians) { | |
UIGraphicsBeginImageContextWithOptions(size, YES, 1); { | |
[[UIColor whiteColor] setFill]; | |
UIRectFill(CGRectInfinite); | |
CGContextRef gc = UIGraphicsGetCurrentContext(); | |
CGContextTranslateCTM(gc, size.width / 2, size.height / 2); |
uniform float speed; | |
uniform float stepsize; | |
uniform float amount; | |
float4 mainImage(VertData v_in) : TARGET | |
{ | |
float time = elapsed_time*speed; | |
float glitch = 0; | |
if( frac(sin(time) * cos(v_in.uv.y*sin(time*1.45))) > amount) glitch=stepsize; |