This file contains hidden or 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
// Command line usage examples: | |
// 1: deno run --allow-run ./Taskfile.js start | |
// 2: deno run --allow-run ./Taskfile.js echo "what?" | |
// 3: deno run --allow-run ./Taskfile.js do-stuff one two three | |
run(Deno.args, { | |
start() { | |
exec.cmd('deno run ./src/index.js'); | |
}, |
This file contains hidden or 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
// Common Utilities | |
function compose(...fns) { | |
const apply = (arg, fn) => fn(arg); | |
return (initial) => fns.reduceRight(apply, initial); | |
} | |
function curry(arity, fn, ...rest) { | |
if(arity <= rest.length) { | |
return fn(...rest); |
This file contains hidden or 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
// Common Utilities | |
function compose(...fns) { | |
const apply = (arg, fn) => fn(arg); | |
return (initial) => fns.reduceRight(apply, initial); | |
} | |
function curry(arity, fn, ...rest) { | |
if(arity <= rest.length) { | |
return fn(...rest); |
This file contains hidden or 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
// Getting some stats from https://dev.to/dashboard | |
// Inspired by this: https://dev.to/tylerlwsmith/get-your-dev-2020-year-in-review-scraping-data-using-the-console-3gen | |
function compose(...fns) { | |
const apply = (arg, fn) => fn(arg); | |
return (initial) => fns.reduceRight(apply, initial); | |
} | |
function to_transducer(reducer) { | |
if(typeof reducer['@@transducer/step'] == 'function') { |
This file contains hidden or 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
" ============================================================================ " | |
" === EDITING OPTIONS === " | |
" ============================================================================ " | |
" Don't include vi compatibility | |
set nocompatible | |
" Sensible backspace | |
set backspace=indent,eol,start |
This file contains hidden or 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
" Open Netrw on the directory of the current file | |
nnoremap <leader>dd :Lexplore %:p:h<CR> | |
" Toggle the Netrw window | |
nnoremap <Leader>da :Lexplore<CR> | |
if &columns < 90 | |
" If the screen is small, occupy half | |
let g:netrw_winsize = 50 | |
else |
This file contains hidden or 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
" ============================================================================ " | |
" === EDITING OPTIONS === " | |
" ============================================================================ " | |
" Don't include vi compatibility | |
set nocompatible | |
" Sensible backspace | |
set backspace=indent,eol,start |
This file contains hidden or 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
{ | |
"cache": false, | |
"await": true | |
} |
This file contains hidden or 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
#! /usr/bin/env node | |
const os = require('os'); | |
const getNetworkAddress = (interfaces) => { | |
for (const name of Object.keys(interfaces)) { | |
for (const interface of interfaces[name]) { | |
const {address, family, internal} = interface; | |
if (family === 'IPv4' && !internal) { | |
return address; |
This file contains hidden or 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
-- ========================================================================== -- | |
-- == EDITOR SETTINGS == -- | |
-- ========================================================================== -- | |
local set = vim.opt | |
set.hidden = true | |
set.swapfile = false | |
set.backup = false | |
set.hlsearch = false |