⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
{exp:channel:entries channel="podcast" status="open"} | |
///*********************************************************************************** | |
// This if statement doesn't work. content is shown for everyone no matter what | |
//************************************************************************************* | |
{if (group_id == "1" OR group_id == "7") && subscription_podcast != ""} | |
<item> | |
<title>{exp:xml_encode}{title}{/exp:xml_encode}</title> | |
<itunes:author>Lex and Terry</itunes:author> | |
<itunes:summary>{exp:xml_encode}{description}{/exp:xml_encode}</itunes:summary> |
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
public class ReverseString { | |
public static void main(String[] argv) { | |
String origString = argv[0]; | |
System.out.println(origString); | |
System.out.println(reverse(origString)); | |
} | |
public static String reverse(String str) { | |
if(str.length()<=1) return str; |
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
<script src="http://www.java.com/js/deployJava.js"></script> | |
<script> | |
var attributes = { id:'sorryApplet', code:'sorryGame.GameApplet', archive:'sorryGame.jar', width:1, height:1}; | |
var parameters = {fontSize:16, jnlp_href:'sorryGame-applet.jnlp', java_status_events: 'true'}; | |
var version = '1.6'; | |
deployJava.runApplet(attributes, parameters, version); | |
</script> |
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
set myPath to POSIX path of (path to home folder) | |
display dialog "myPath is " & myPath |
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
-(NSArray *)playlistsInFolder:(SPPlaylistFolder *)aFolder { | |
NSMutableArray *playlists = [NSMutableArray arrayWithCapacity:[[aFolder playlists] count]]; | |
for (id playlistOrFolder in aFolder.playlists) { | |
if ([playlistOrFolder isKindOfClass:[SPPlaylist class]]) { | |
[playlists addObject:playlistOrFolder]; | |
} else { | |
[playlists addObjectsFromArray:[self playlistsInFolder:playlistOrFolder]]; | |
} |
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
######################### | |
# .gitignore file for Xcode4 / OS X Source projects | |
# | |
# NB: if you are storing "built" products, this WILL NOT WORK, | |
# and you should use a different .gitignore (or none at all) | |
# This file is for SOURCE projects, where there are many extra | |
# files that we want to exclude | |
# | |
# For updates, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
######################### |
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
# pragma mark - | |
# MapView Delegate methods | |
- (void)mapView:(MKMapView *)map regionDidChangeAnimated:(BOOL)animated | |
{ | |
NSArray *oldAnnotations = mapView.annotations; | |
[mapView removeAnnotations:oldAnnotations]; | |
NSArray *weatherItems = [weatherServer weatherItemsForMapRegion:mapView.region maximumCount:4]; | |
[mapView addAnnotations:weatherItems]; |
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
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
self.dangerZones = [[DZStoredObjects alloc] init]; | |
// Create a stack and load it with the view controllers from | |
// our tabs. | |
NSMutableArray *stack = [NSMutableArray arrayWithArray:self.viewControllers]; | |
// While we still have items on our stack | |
while ([stack count] > 0) { | |
// pop the last item off the stack. |
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
# Here is a Bookmarklet for running the script using the current page's URL | |
# as input: javascript:(function()%7Bif(document.location.href.indexOf('http')===0)document.location.href='pythonista://marky?action=run&argv='+document.location.href;%7D)(); | |
import clipboard | |
import urllib2 | |
import webbrowser | |
def markdownify(clipstring): | |
marky = 'http://heckyesmarkdown.com/go/?u=' |