Skip to content

Instantly share code, notes, and snippets.

View esundahl's full-sized avatar

Erik Sundahl esundahl

View GitHub Profile
@esundahl
esundahl / test.js
Last active November 24, 2020 01:26
tests.js
// This one...?
describe('Test the thing', () => {
let myThing;
beforeEach() => {
myThing = new MyThing({ hello: 'world' });
}
it('it should equal something when passed value1', () => {
@esundahl
esundahl / style.css
Last active October 16, 2020 03:03
Roam Customizations
@import url("https://linuz90.github.io/better-roam-research/main.css");
.rm-page-ref-brackets { display: none !important; }
.rm-page-ref-link-color { color: #e5bc95 !important; }
.rm-alias-external { color: #8fbce0; }
@esundahl
esundahl / array-construction.js
Last active April 14, 2021 20:28
Create a new array with values 0-99
// https://itnext.io/heres-why-mapping-a-constructed-array-doesn-t-work-in-javascript-f1195138615a
Array(100).map((_, i) => i) // Won't work
[...Array(100)].map((_, i) => i) // Will work
const range = (start, end) => Array.from({ length: end - start + 1 }, (x, i) => i + start)
range(0, 100)
### Keybase proof
I hereby claim:
* I am esundahl on github.
* I am esundahl (https://keybase.io/esundahl) on keybase.
* I have a public key whose fingerprint is C8FF D4BB 1AAC 22FC 0703 F81F B657 4EE2 FCE9 A697
To claim this, I am signing this object:
lib-cov
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz
*.DS_Store
*.swp
@esundahl
esundahl / .ackrc
Created November 13, 2013 17:50
Ack config
--type-set=ruby=.haml,.rake,.rsel
--type-set=prestyle=.sass,.styl,.scss,.less
--type-set=style=.sass,.styl,.scss,.less,.css
--type-set=template=.haml,.jade,.erb,.eco,.html
--type-set=script=.js,.json,.coffee
@esundahl
esundahl / .jshintrc
Last active December 28, 2015 05:58
jshint configurations
{
"indent": 2,
"immed": true,
"strict": false,
"globalstrict": true,
"trailing": true,
"maxparams": 3,
"camelcase": true,
"asi": true,
"quotmark": "single",
@esundahl
esundahl / config.js
Last active December 27, 2015 14:49 — forked from tj/config.js
#javascript #node.js
/**
* Module dependencies.
*/
var pkg = require('../package');
var env = process.env.NODE_ENV || 'development';
/**
* Return setting `name`.
*
@esundahl
esundahl / marks.sh
Created August 17, 2013 15:45
bash directory bookmarking functions
export MARKPATH=$HOME/.marks
function jump {
cd -P $MARKPATH/$1 2>/dev/null || echo "No such mark: $1"
}
function mark {
mkdir -p $MARKPATH; ln -s $(pwd) $MARKPATH/$1
}
function unmark {
rm -i $MARKPATH/$1
}
@esundahl
esundahl / Pastel
Created February 16, 2013 04:39
My custom vim theme
set background=dark
highlight clear
if exists("syntax on")
syntax reset
endif
let g:colors_name="Pastel"
hi Normal guifg=#e6b9de guibg=#252525
hi Comment guifg=#f2f2f2 guibg=NONE
hi Constant guifg=#e5bc95 guibg=NONE
hi String guifg=#e5bc95 guibg=NONE