/macgap.app.enabledevelopertools()
/color andrew #000000
/status
| function less() { | |
| url="$_" | |
| if [[ $url == http* ]]; then | |
| args=( "$@" ) | |
| unset "args[${#args[@]}]" # remove the last element | |
| lynx --dump $url | command less $args | |
| else | |
| command less $@ | |
| fi | |
| } |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <Bucket | |
| type = "2" | |
| version = "2.0"> | |
| <Breakpoints> | |
| <!-- All Exceptions --> | |
| <BreakpointProxy | |
| BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint"> | |
| <BreakpointContent |
| """Simple HTTP Server. | |
| This module builds on BaseHTTPServer by implementing the standard GET | |
| and HEAD requests in a fairly straightforward manner. | |
| """ | |
| __version__ = "0.6" |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <!-- array of downloads. --> | |
| <key>items</key> | |
| <array> | |
| <dict> | |
| <!-- an array of assets to download --> |
| #!/usr/bin/env ruby | |
| device_types_output = `xcrun simctl list devicetypes` | |
| device_types = device_types_output.scan /(.*) \((.*)\)/ | |
| runtimes_output = `xcrun simctl list runtimes` | |
| runtimes = runtimes_output.scan /(.*) \(.*\) \((com.apple[^)]+)\)$/ | |
| devices_output = `xcrun simctl list devices` | |
| devices = devices_output.scan /\s\s\s\s(.*) \(([^)]+)\) (.*)/ |
| - (NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath { | |
| UITableViewRowAction *moreAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"More" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){ | |
| // maybe show an action sheet with more options | |
| [self.tableView setEditing:NO]; | |
| }]; | |
| moreAction.backgroundColor = [UIColor lightGrayColor]; | |
| UITableViewRowAction *blurAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Blur" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){ | |
| [self.tableView setEditing:NO]; | |
| }]; |
| class Singleton { | |
| class var sharedInstance: Singleton { | |
| struct Static { | |
| static var token: dispatch_once_t = 0 | |
| static var instance: Singleton! | |
| } | |
| dispatch_once(&Static.token) { | |
| Static.instance = Singleton() | |
| } | |
| return Static.instance |
| extension Array { | |
| func first() -> Element? { | |
| if isEmpty { | |
| return nil | |
| } | |
| return self[0] | |
| } | |
| func last() -> Element? { |