git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
function createWindow(urlPath) { | |
if (urlPath === void 0) { urlPath = ""; } | |
var windowState = windowStateKeeper({ | |
defaultWidth: 1320, | |
defaultHeight: 860, | |
}); | |
var rect = { | |
x: windowState.x, | |
y: windowState.y, | |
width: windowState.width, |
// polyfill window.getMatchedCSSRules() in Chrome | |
if ( typeof window.getMatchedCSSRules !== 'function' ) { | |
var ELEMENT_RE = /[\w-]+/g, | |
ID_RE = /#[\w-]+/g, | |
CLASS_RE = /\.[\w-]+/g, | |
ATTR_RE = /\[[^\]]+\]/g, | |
// :not() pseudo-class does not add to specificity, but its content does as if it was outside it | |
PSEUDO_CLASSES_RE = /\:(?!not)[\w-]+(\(.*\))?/g, | |
PSEUDO_ELEMENTS_RE = /\:\:?(after|before|first-letter|first-line|selection)/g; | |
// convert an array-like object to array |
var input = `15 7 1 1 + − ÷ 3 × 2 1 1 + + −` | |
var processed_input = input.split(' ') | |
function RPN() { | |
var stack = []; | |
var f = function() { | |
}; | |
f.size = function() { | |
return stack.length; | |
} |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
// | |
// NSWorkspace+ApplicationForOpeningURL.h | |
// | |
// Created by Scott Jackson on 10/07/12. | |
// Copyright (c) 2012 SJSoftware. All rights reserved. | |
// | |
#import <Cocoa/Cocoa.h> | |
@interface NSWorkspace (ApplicationForOpeningURL) |
import Cocoa | |
// https://github.com/DouglasHeriot/AutoGrowingNSTextField | |
// for AutoLayout | |
class AutoGrowingTextField: NSTextField { | |
var minHeight: CGFloat? = 100 |
NSShadow *textShadow = [[NSShadow alloc] init]; | |
textShadow.shadowColor = [UIColor darkGrayColor]; | |
textShadow.shadowBlurRadius = 1.2; | |
textShadow.shadowOffset = CGSizeMake(1,1); | |
NSDictionary *attributes = @{NSForegroundColorAttributeName: [UIColor blackColor], | |
NSShadowAttributeName: textShadow | |
}; | |
/* | |
* StickyNoteView | |
* | |
* Created by Jim McGowan on 04/10/2007. | |
* Updated 05/09/2012 for Reference Tracker 2 | |
* | |
* This code uses ARC | |
* | |
* Copyright (c) 2006 - 2010 Jim McGowan | |
* All rights reserved. |
// | |
// PaddedNSTextField.swift | |
// reference - https://stackoverflow.com/a/38138336 | |
import Cocoa | |
class PaddedNSTextFieldCell: NSTextFieldCell { | |
@IBInspectable var leftPadding: CGFloat = 8.0 |
// | |
// RoundedNSTextFieldCell.swift | |
// | |
// https://stackoverflow.com/a/40065608 | |
import Cocoa | |
class RoundedTextFieldCell: NSTextFieldCell { | |
@IBInspectable var borderColor: NSColor = .clear |