Function | Shortcut |
---|---|
New Tab | ⌘ + T |
Close Tab or Window | ⌘ + W (same as many mac apps) |
Go to Tab | ⌘ + Number Key (ie: ⌘2 is 2nd tab) |
Go to Split Pane by Direction | ⌘ + Option + Arrow Key |
Cycle iTerm Windows | ⌘ + backtick (true of all mac apps and works with desktops/mission control) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.vertexfragment.com/ramblings/cantor-szudzik-pairing-functions/ | |
# https://stackoverflow.com/questions/38965931/hash-function-for-3-integers | |
# https://math.stackexchange.com/questions/222709/inverting-the-cantor-pairing-function | |
def normalize(x): | |
# this function make cantor pairing function work for negative numbers | |
return 2*x if (x>=0) else (-2*x-1) | |
def normalize_inv(x): | |
return x//2 if (x % 2 == 0) else -(x+1)//2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.function.Consumer; | |
import java.util.function.Function; | |
import java.util.Optional; | |
public class Example { | |
public static void main(String []args) { | |
// Create a series of nullable objects. | |
Test a = new Test(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# drone.yml for node js CI with npm login | |
# Don't forget to configure DRONE_SERVER and DRONE_SERVER | |
# Now create a secrets.yml (OUTSIDE of your repo!!) (see other file) | |
# then run drone secure --repo <drone_repo_name> --in <path>/secrets.yml | |
build: | |
unit_tests: | |
image: risingstack/alpine:3.3-v4.2.6-1.1.3 | |
commands: | |
- npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN | |
- npm install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This work is free. You can redistribute it and/or modify it under the | |
* terms of the Do What The Fuck You Want To Public License, Version 2, | |
* as published by Sam Hocevar. See the COPYING file for more details. | |
*/ | |
/* | |
* Easing Functions - inspired from http://gizma.com/easing/ | |
* only considering the t value for the range [0, 1] => [0, 1] | |
*/ | |
EasingFunctions = { |