Skip to content

Instantly share code, notes, and snippets.

View jsatk's full-sized avatar
💀

Jesse Atkinson jsatk

💀
View GitHub Profile
@jsatk
jsatk / Makefile
Created July 2, 2019 00:34 — forked from begriffs/Makefile
Installing binaries as needed
VPATH=/usr/local/bin
BINARIES=ruby node
all : ${BINARIES}
echo "Deps are installed"
${BINARIES} :
asdf plugin-add $@
@jsatk
jsatk / Makefile
Last active June 29, 2019 04:07
Small part of my makefile that is bad.
# asdf --------------------------------------------------------------------- {{{
# TODO: This is horrible. Do this in a loop and stash the results of `asdf
# plugin-list` so you only have to call it once.
node_installed := $(shell [[ "$(shell asdf plugin-list)" == *nodejs* ]] && echo 0 || echo 1)
ruby_installed := $(shell [[ "$(shell asdf plugin-list)" == *ruby* ]] && echo 0 || echo 1)
golang_installed := $(shell [[ "$(shell asdf plugin-list)" == *golang* ]] && echo 0 || echo 1)
rust_installed := $(shell [[ "$(shell asdf plugin-list)" == *rust* ]] && echo 0 || echo 1)
python_installed := $(shell [[ "$(shell asdf plugin-list)" == *python* ]] && echo 0 || echo 1)
@jsatk
jsatk / tab-or-complete.vim
Created September 12, 2018 19:04
Tab or complete when in insert mode in vim
" Auto-Completion --------------------------------------------------------- {{{
" Use TAB to complete when typing words, else inserts TABs as usual.
function! Tab_Or_Complete(move_to_next_word) abort
" If auto-complete menu is not open and we are in the middle of typing a
" word OR if auto-complete menu is already open the `tab` cycles through
" suggested completions.
if pumvisible() || (col('.')>1 && strpart( getline('.'), col('.')-2, 3 ) =~ '^\w')
return a:move_to_next_word
else
" Uses Dispatch to print the flow type of the variable under the cursor.
"
" Example:
"
" ```javascript
"
" type Person = {age: number, name: string, sex: 'male' | 'female'}
" const person: Person = {age: 35, name: 'Bob', sex: 'male'};
" const {a|ge, sex} = person;
" ^
@jsatk
jsatk / best-albums-of-2018.md
Last active December 13, 2018 01:31
Best Albums of 2018

Best Albums of 2018

People who released notable new records I haven't listened to enough of to have a strong opinion on:

  • Low
  • Cloud Nothings
  • Cursive
  • Foxing “Nearer my god”
  • Mewithoutyou
  • Interpol
@jsatk
jsatk / favorite-modern-horror.md
Last active September 2, 2018 01:58
A list of my favorite modern horror.

Best Modern Horror

A * means it’s on the more intense and disturbing end of the spectrum. And if you think I missed a great one feel free to tweet at me at @jsatk.

Creature Feature

  • It Follows
  • Babadook
  • Cloverfield
const config = Object.freeze({
async: true,
page: 4
});
const getThing = config => {
const awesomeFunction = options => {
const updatedOptions = Object.assign({}, options, {
offset: options.offset || 10
});
const options = Object.freeze({
async: true,
page: 4
});
const awesomeFunction = options => {
const updatedOptions = Object.assign({}, options, {
offset: options.offset || 10
});
const options = {
async: true,
page: 4
};
const awesomeFunction = options => {
if (!options.offset) {
options.offset = 10;
}
const rectangle = (height, width) => ({
height,
width,
get area() {
return height * width;
}
});
const myRectangle = rectangle(10, 20);
myRectangle.area // => 200