Skip to content

Instantly share code, notes, and snippets.

View nickhingston's full-sized avatar

Nick Hingston nickhingston

View GitHub Profile
vpop://open-image-url/?location=https%3A%2F%2Fimageworld.visbion.com%3A443%2FTest%2FCgi64%2FWebGuiCgi.exe%3FAction%3DPatientDicomImageData%26Key%3DDDAHDCALDIABDGAADJANCNBMCLBDDDAGDEAMDN%26ImageID%3D4933
vpop://open-image-url?location=https://www.asteris.biz/Keystone/ImageDownload.aspx?ClinicCode=ASTERISSALES&ImageId=ddd35f31-e945-ee41-0211-ffffff200309&ImageType=JpegDicom&FrameIndex=0
vpop://open-image-url?location=https%3A%2F%2Fwww.asteris.biz%2FKeystone%2FImageDownload.aspx%3FClinicCode%3DASTERISSALES%26ImageId%3Dddd35f31-e945-ee41-0211-ffffff200309%26ImageType%3DJpegDicom%26FrameIndex%3D0
@nickhingston
nickhingston / DefaultKeyBinding.dict
Created January 22, 2020 09:21
Stop [beep bong noise] on cmd+ctrl+left, right, up and down. Put in ~/Library/KeyBindings/DefaultKeyBinding.dict
{
"^@\UF701" = "noop";
"^@\UF702" = "noop";
"^@\UF703" = "noop";
}
@nickhingston
nickhingston / settings.json
Created January 13, 2020 14:07
VSCode terminal and powerline10k font support
"terminal.integrated.fontFamily": "MesloLGS NF"
@nickhingston
nickhingston / GCDServer_proxy.m
Last active August 2, 2017 21:32
GDCServer proxy /api
GCDWebServerMatchBlock matchBlock = ^GCDWebServerRequest *(NSString* requestMethod, NSURL* requestURL, NSDictionary* requestHeaders, NSString* urlPath, NSDictionary* urlQuery) {
if (![urlPath hasPrefix:@"/api/"]) {
return nil;
}
return [[GCDWebServerDataRequest alloc] initWithMethod:requestMethod url:requestURL headers:requestHeaders path:urlPath query:urlQuery];
};
GCDWebServerAsyncProcessBlock asyncProcessBlock = ^void (GCDWebServerRequest* request, GCDWebServerCompletionBlock complete) {
@nickhingston
nickhingston / gist:4ece0c6c28433d0180e3f85e5012b392
Last active November 18, 2016 19:04 — forked from kaizhu256/gist:4482069
javascript - very fast and simple uuid4 generator benchmarked on http://jsperf.com/uuid4/8
/*jslint bitwise: true, indent: 2, nomen: true, regexp: true, stupid: true*/
(function () {
'use strict';
var uuid4 = function () {
//// return uuid of form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
var uuid = '', ii;
for (ii = 0; ii < 32; ii += 1) {
switch (ii) {
case 8:
@nickhingston
nickhingston / gist:6550292
Created September 13, 2013 12:54
html5 mobile app template
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
<meta name="viewport" id="vp" content="initial-scale=1.0,user-scalable=no,maximum-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<link href="css/app.css" rel="stylesheet" media="screen">
@nickhingston
nickhingston / gist:6550112
Created September 13, 2013 12:37
filtered NSComboBox data source
- (void) filterEmailAddresses:(NSString*) filter {
NSArray *emails = (_onlyShowMyAddresses) ? _myEmailAddresses : _emailAddresses;
if (![filter length]) {
self.filteredAddresses = emails;
}
else {
self.filteredAddresses = [emails filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"name contains[c] %@ or address contains[c] %@", filter, filter]];
}
}