Skip to content

Instantly share code, notes, and snippets.

View cgradwohl's full-sized avatar
🌱
Growth Mode

Chris Gradwohl cgradwohl

🌱
Growth Mode
View GitHub Profile
@cgradwohl
cgradwohl / bst.js
Created December 29, 2016 08:38 — forked from trevmex/bst.js
A simple binary search tree in JavaScript
/*
* File: bst.js
*
* A pure JavaScript implementation of a binary search tree.
*
*/
/*
* Class: BST
*
@cgradwohl
cgradwohl / lexical_scope.js
Created April 30, 2018 19:54
lexical scope example
var x = "!";
var outer = () => {
var a = "there";
var inner = () => console.log("Hey " + a + x);
return inner();
}
outer(); // --> "Hey there!"
@cgradwohl
cgradwohl / basic_closure.js
Last active June 19, 2018 23:11
basic closure
var x = "!";
var outer = () => {
var a = "there";
// inner() has CLOSURE over outer()
var inner = () => console.log("Hey " + a + x);
return inner;
}
@cgradwohl
cgradwohl / basic_closure2.js
Last active May 3, 2018 21:05
another basic closure
var x = "!";
var outer = () => {
var a = "there";
var inner = () => console.log("Hey " + a + x);
return inner;
}
var anotherOuter = outer();
@cgradwohl
cgradwohl / alert_closure.js
Last active June 19, 2018 23:19
Alert Closure
const abductionAlert = (city) => {
const title = "Greetings Earthlings! The Current Alien Abduction Count in "
+ `${city}` + " Is: ";
let count = 0;
const alertFactory = () => {
alert(`${title} ${++count}`);
}
return alertFactory;
@cgradwohl
cgradwohl / bitrise.yml
Created April 8, 2020 15:35
first pipeline implementation
---
format_version: '8'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: react-native
trigger_map:
- push_branch: master
workflow: staging
workflows:
setup:
steps:
@cgradwohl
cgradwohl / husky_hook.json
Created April 8, 2020 16:47
Put this back !!!
"husky": {
"hooks": {
"pre-push": "./native-dep-check.sh && npm run lint"
}
}
@cgradwohl
cgradwohl / bitrise.yml
Created April 8, 2020 19:17
new pipelinee update 12:16, tuesday
---
format_version: '8'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: react-native
trigger_map:
- push_branch: master
workflow: production
- push_branch: staging
workflow: staging
- push_branch: "*"
@cgradwohl
cgradwohl / gist:c7023d632539763a247e3703250950b6
Created April 10, 2020 16:33
Friday bitrise.yml backup
---
format_version: '8'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: react-native
trigger_map:
- push_branch: master
workflow: production
- push_branch: staging
workflow: staging
- push_branch: "*"
@cgradwohl
cgradwohl / bitrise.yml
Created May 5, 2020 17:31
bitrise.yml May 5
---
format_version: '8'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: react-native
trigger_map:
- push_branch: master
workflow: production
- push_branch: staging
workflow: staging
- push_branch: "*"