Skip to content

Instantly share code, notes, and snippets.

Sam Lazarus sl

Block or report user

Report or block sl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sl
sl / install_headers.bash
Created Apr 28, 2019
[Swift Complier Environment Configuration] Install macOS SDK headers
View install_headers.bash
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
@sl
sl / settings.json
Created Apr 28, 2019
[Swift Complier Environment Configuration] File Associations
View settings.json
"files.associations": {
"*.swift.result": "swift",
"*.swift.gyb": "swift",
"*.gyb": "swift",
"*.cpp.gyb": "cpp",
}
@sl
sl / asyncawaitsort.js
Created Aug 14, 2017
Asyncawait Sort
View asyncawaitsort.js
// don't worry about it... it just works
function delay(ms){
var ctr, rej, p = new Promise(function (resolve, reject) {
ctr = setTimeout(() => resolve(ms), ms);
rej = reject;
});
p.cancel = function(){ clearTimeout(ctr); rej(Error("Cancelled"))};
return p;
}
View gist:4849f78b68de0444cb188844c49012cb
config defaultToCurrentScreen true
# Abstract positions
alias full move screenOriginX;screenOriginY screenSizeX;screenSizeY
alias lefthalf move screenOriginX;screenOriginY screenSizeX/2;screenSizeY
alias righthalf move screenOriginX+screenSizeX/2;screenOriginY screenSizeX/2;screenSizeY
alias tophalf move screenOriginX;screenOriginY screenSizeX;screenSizeY/2
alias bottomhalf move screenOriginX;screenOriginY+screenSizeY/2 screenSizeX;screenSizeY/2
alias topleft corner top-left resize:screenSizeX/2;screenSizeY/2
alias topright corner top-right resize:screenSizeX/2;screenSizeY/2
View keybase.md

Keybase proof

I hereby claim:

  • I am sl on github.
  • I am slazarus (https://keybase.io/slazarus) on keybase.
  • I have a public key whose fingerprint is BF48 D5CB 8F19 A5F6 7AA0 1EB5 47CE 0A4B 04A9 E1F2

To claim this, I am signing this object:

You can’t perform that action at this time.