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
// ==UserScript== | |
// @name Use Markdown, sometimes, in your HTML. | |
// @author Paul Irish <http://paulirish.com/> | |
// @link http://git.io/data-markdown | |
// @match * | |
// ==/UserScript== | |
// If you're not using this as a userscript just delete from this line up. It's cool, homey. |
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
// What results can you get just using these characters: +[] | |
// I know this has been done before, but I don't have the link, | |
// and I don't want it (not yet, at least) | |
// basic numbers | |
0: +[] | |
1: ++[+[]][+[]] | |
2: ++[++[+[]][+[]]][+[]] | |
3: ++[++[++[+[]][+[]]][+[]]][+[]] | |
4: ++[++[++[++[+[]][+[]]][+[]]][+[]]][+[]] |
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
// ==UserScript== | |
// @name UTM param stripper | |
// @author Paul Irish | |
// @namespace http://github.com/paulirish | |
// @version 1.2 | |
// @description Drop the UTM params from a URL when the page loads. | |
// @extra Cuz you know they're all ugly n shit. | |
// @include http*://* | |
// ==/UserScript== |
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)clearCaches { | |
// clear any URL caches | |
[[NSURLCache sharedURLCache] removeAllCachedResponses]; | |
// clear any cookie caches | |
NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; | |
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"https://%@/", kAPIHost]]; | |
for (NSHTTPCookie *cookie in [cookieStorage cookiesForURL:url]) { | |
[cookieStorage deleteCookie:cookie]; | |
} |