I hereby claim:
- I am jbradforddillon on github.
- I am jbradforddillon (https://keybase.io/jbradforddillon) on keybase.
- I have a public key ASAlbSGlRGttBA_JpRd9YLwBHjUv-j87gEk5-CIG4AwZAAo
To claim this, I am signing this object:
// ==UserScript== | |
// @name Open PRs | |
// @description Opens all PRs in new tabs | |
// @match *://github.com/pulls | |
// @match *://github.com/pulls* | |
// @match *://github.com/**/pulls* | |
// @match *://github.com/**/pulls | |
// @require https://code.jquery.com/jquery-3.6.0.min.js | |
// ==/UserScript== |
extension View { | |
public func stackingSheet<Item, Content>(item: Binding<Item?>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping (Item) -> Content) -> some View where Item : Identifiable, Content : View { | |
return self.background(EmptyView().sheet(item: item, onDismiss: onDismiss, content: content)) | |
} | |
public func stackingSheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content : View { | |
return self.background(EmptyView().sheet(isPresented: isPresented, onDismiss: onDismiss, content: content)) | |
} | |
} |
I hereby claim:
To claim this, I am signing this object:
let viewController = UIViewController() | |
var b: (Bool) -> Void = { | |
(var cancelled) -> Void in | |
viewController.dismissViewControllerAnimated(true, completion: nil) | |
// dismissViewControllerAnimated returns Void, no problem. | |
} | |
var b: (Bool) -> Void = { | |
(var cancelled) -> Void in | |
viewController.navigationController.popViewControllerAnimated(true) |
#!/usr/bin/env python | |
import sys | |
f = open(sys.argv[1]) | |
output = "" | |
for line in f: | |
if line[0:10] == "@interface": | |
colonIndex = line.find(":") | |
implLine = line |
// Classic delegation | |
- (void)myOperationDidSucceed:(id data) { | |
[myView hideLoadingIndicator]; | |
// Do something with data | |
} | |
- (void)myOperationDidFail:(NSError *)error { | |
[myView hideLoadingIndicator]; | |
// Do something with the error | |
} |
if [ -f ~/.git-prompt.sh ]; then | |
. ~/.git-prompt.sh | |
fi | |
GIT_PS1_SHOWDIRTYSTATE=true | |
GIT_PS1_SHOWSTASHSTATE=true | |
GIT_PS1_SHOWUNTRACKEDFILES=true | |
if [ -f /opt/local/etc/bash_completion ]; then | |
. /opt/local/etc/bash_completion |
// Used to highlight a view, often to encourage a client decision | |
#define Uglify(view) view.backgroundColor = [UIColor magentaColor] | |
// Used to make missing graphics unmistakable | |
#define MissingGraphic(width, height) [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://placekitten.com/%i/%i", width, height]]]] | |
// Used to indicate incomplete functionality or known issues. | |
#define DangerZone(message) [[[UIAlertView alloc] initWithTitle:@"Welcome to the Danger Zone" message:message delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil] show] |
# timestampHeader.py | |
import datetime | |
import sublime, sublime_plugin | |
class TimestampheaderCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
id_attr = "e%s" % datetime.datetime.now().strftime("%Y%m%d%H%M") | |
timestamp = datetime.datetime.now().strftime("%A, %B %d %Y @ %r") | |
header = "<h3 id=\"%s\"><a href=\"#%s\">%s</a></h3>" % (id_attr, id_attr, timestamp) |