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
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:

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
@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;
}
@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 / 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 / clang_include_results.bash
Last active Apr 28, 2019
[Swift Complier Environment Configuration] Clang include results
View clang_include_results.bash
clang -cc1 version 8.0.0 based upon LLVM 8.0.0 default target x86_64-apple-darwin18.2.0
ignoring nonexistent directory "/usr/include/c++/v1"
ignoring nonexistent directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/opt/llvm/bin/../include/c++/v1
/usr/local/include
/usr/local/Cellar/llvm/8.0.0/lib/clang/8.0.0/include
/System/Library/Frameworks (framework directory)
/Library/Frameworks (framework directory)
@sl
sl / launch.json
Created Apr 28, 2019
[Swift Complier Environment Configuration] Debug Launch
View launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug",
"program": "${env:SWIFT_BUILD_DIR}/bin/swift",
"args": ["${input:testFile}"],
"cwd": "${env:SWIFT_EXAMPLES_DIR}",
@sl
sl / tasks.json
Created Apr 28, 2019
[Swift Complier Environment Configuration] Format Task
View tasks.json
{
"label": "Format changes",
"type": "shell",
"command": "git",
"args": [
"clang-format",
"master"
]
}
@sl
sl / keybindings.json
Created Apr 28, 2019
[Swift Complier Environment Configuration] Add Keybinding For Task
View keybindings.json
{
"key": "<keyboard shortcut>",
"command": "workbench.action.tasks.runTask",
"args": "<task name>"
}
@sl
sl / tasks.json
Created Apr 28, 2019
[Swift Complier Environment Configuration] Build Tasks
View tasks.json
{
"label": "Ninja Build (Swift)",
"type": "shell",
"command": "ninja",
"args": [
"swift"
],
"options": {
"cwd": "${env:SWIFT_BUILD_DIR}"
},
You can’t perform that action at this time.