This file contains hidden or 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
navigator.getcurrentposition(function(p){console.info(o)}) |
This file contains hidden or 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
#!/usr/bin/env python | |
""" Sample calls: | |
http://twimgproxy.appspot.com/image?screen_name=evanlong | |
http://twimgproxy.appspot.com/image?user_id=20 | |
""" | |
from google.appengine.ext import webapp | |
from google.appengine.ext.webapp import util | |
from google.appengine.api.urlfetch import fetch |
This file contains hidden or 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
<!-- This file goes in ~/Library/LaunchAgents --> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Disabled</key> | |
<false/> | |
<key>KeepAlive</key> | |
<true/> |
This file contains hidden or 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
0 libsystem_kernel.dylib mach_msg_trap (in libsystem_kernel.dylib) + 20 | |
1 libsystem_kernel.dylib mach_msg (in libsystem_kernel.dylib) + 50 | |
2 libxpc.dylib _xpc_connection_check_in (in libxpc.dylib) + 152 | |
3 libxpc.dylib _xpc_connection_init (in libxpc.dylib) + 1032 | |
4 libxpc.dylib _xpc_connection_wakeup2 (in libxpc.dylib) + 774 | |
5 libxpc.dylib _xpc_connection_wakeup (in libxpc.dylib) + 62 | |
6 libxpc.dylib _xpc_connection_send_registration (in libxpc.dylib) + 24 | |
#If you are reading this... reboot your iOS device. Your problems will probably go away. |
This file contains hidden or 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
Copyright (C) <year> <copyright holders> | |
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 furnished to do | |
so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all |
This file contains hidden or 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
/** | |
Copyright (C) 2011 Evan Long | |
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 furnished to do | |
so, subject to the following conditions: |
This file contains hidden or 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
/* | |
See screenshot: http://cl.ly/1v1H0Q1z0Z3R0z3X1R25 | |
*/ | |
- (void)loadView { | |
self.view = [[[UIView alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; | |
CGFloat width = self.view.frame.size.width; | |
This file contains hidden or 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
import sys | |
def foo(n): | |
a = "Hello" | |
b = "bob" | |
c = 1 / n | |
return a + " " + b |
This file contains hidden or 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
Instead of ARC: | |
Add scoperelease in addition to release and autorelease. | |
Think of it like scoped_ptr in C++ or more generally how deconstructors | |
get called for stack allocated objects (end of scope). | |
- (id)someMethod:(NSInteger)n { | |
MyObject *o = [[[MyObject alloc] init] scoperelease]; |
This file contains hidden or 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
#include <stdio.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <dirent.h> | |
int main(int argc, char** argv) { | |
DIR *d = opendir("."); | |
struct dirent *entry = NULL; |