Skip to content

Instantly share code, notes, and snippets.

View cwahlfeldt's full-sized avatar
🧇

Chris Wahlfeldt cwahlfeldt

🧇
View GitHub Profile
@cwahlfeldt
cwahlfeldt / breadth-first-search.ts
Last active March 6, 2023 13:31
Breadth first search
type Graph = number[][]
type PredecessorMap = {[key:number]: number}
type Path = number[]
function searchPath(graph: Graph, start: number, goal: number): PredecessorMap {
let predecessorMap: PredecessorMap = {[start]: 0}
let frontier = [start]
while (frontier.length !== 0) {
const current = frontier[0]
@cwahlfeldt
cwahlfeldt / closure_pattern
Created July 25, 2019 09:23 — forked from forestbaker/closure_pattern
closure in bash ... ?
# closure - defined by Peter Landin in 1964
# closure - a function, plus a pointer to that functions scope
# In programming languages, closures (also lexical closures or function closures) are a technique for
# implementing lexically scoped name binding in languages with first-class functions. Duh.
# Operationally, a closure is a record storing a function[a] together with an environment:[1]
# A mapping associating each free variable of the function (variables that are used locally, but defined in an enclosing scope)
# with the value or storage location to which the name was bound when the closure was created.
react-native init AwesomeProject
cd AwesomeProject
react-native start
@cwahlfeldt
cwahlfeldt / log
Last active January 31, 2018 15:36
$ npm run start:auth
> npm-base-template@1.0.0 start:auth /Users/cwahlfeldt/Apps/base-template-npm
> squarespace setup && (npm run watch & npm run authserver)
? Would you like to create a new site or start with an existing one? Create a new website
Warn: `squarespace.templateId` not present in package.json. Using `base-template` to clone the new site.
? Would you like to log in or create a new account? Log in
? What's your email address? chriswahlfeldt@gmail.com
? Password **********
npm WARN deprecated graceful-fs@2.0.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated graceful-fs@3.0.8: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN optional dep failed, continuing fsevents@1.0.12
npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
> gifsicle@3.0.3 postinstall /code/wp-content/themes/sage/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-gifsicle/node_modules/gifsicle
> node lib/install.js
⚠ spawn /code/wp-content/themes/sage/node_modules
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
" Main VIMRC config file
" Use this to config your vim setup
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
"VUNDLE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
set nocompatible " be iMproved, required
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
" Main VIMRC config file
" Use this to config your vim setup
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
"VUNDLE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
set nocompatible " be iMproved, required
@cwahlfeldt
cwahlfeldt / styles.css
Last active August 29, 2015 14:01
waffles-WP-theme
/****** Wordpress CSS *****/
/*** GLOBAL : GENERAL STYLE DEFAULTS ***/
/************* Unifies My font(YAY!!!!!!!!!) ******************/
@font-face {
font-family: FixedsysExcelsior;
src: url("fsex300-webfont.eot");
src: url("fsex300-webfont.eot?#iefix') format('embedded-opentype"),
url("fsex300-webfont.woff") format('woff'),