This file contains 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 bash | |
kill `netstat -tulpn | grep :$1 | sed -e "s/.*LISTEN *//" -e 's/\/.*//'` |
This file contains 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
Object.mapEntries = (obj, fn) => | |
Object.assign({}, ...Object.entries(obj).map(e => fn(e, obj)).map(([k, v]) => ({ [k]: v }))); | |
Object.mapValues = (obj, fn) => | |
Object.mapEntries(obj, ([k, v]) => [k, fn(v, obj)]); | |
Object.mapKeys = (obj, fn) => | |
Object.mapEntries(obj, ([k, v]) => [fn(k, obj), v]); |
This file contains 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
Promise.delay = ms => new Promise(resolve => setTimeout(resolve, ms)); |
This file contains 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
Promise.sequential = funcs => funcs.reduce((p, fn) => p.then(rs => fn().then(r => [...rs, r])), Promise.resolve([])) |
This file contains 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
Array.createRandomSortFunction = () => { | |
let map = new Map([]); | |
let lookup = v => { | |
if(map.get(v)) return map.get(v); | |
let o = Math.random(); | |
map.set(v, o); | |
return o; | |
} |
This file contains 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
Promise.allObjectValues = async obj => | |
Object.assign({}, ...(await Promise.all(Object.entries(obj).map(async ([k, v]) => ({ [k]: await v }))))) |
This file contains 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
Array.prototype.asyncMap = function(fn){ | |
return Promise.all(this.map(fn)) | |
} |
This file contains 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
generateSetters = (obj) => | |
new Proxy({}, { | |
get: (_, name) => { | |
name = | |
name.startsWith("_") ? | |
name.slice(1) : | |
name.startsWith("set") ? | |
name[3].toLowerCase() + name.slice(4) : | |
name |
This file contains 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
; acceleration_enabled = {acceleration_enabled} | |
; acceleration_infill = {acceleration_infill} | |
; acceleration_ironing = {acceleration_ironing} | |
; acceleration_layer_0 = {acceleration_layer_0} | |
; acceleration_prime_tower = {acceleration_prime_tower} | |
; acceleration_print = {acceleration_print} | |
; acceleration_print_layer_0 = {acceleration_print_layer_0} | |
; acceleration_roofing = {acceleration_roofing} | |
; acceleration_skirt_brim = {acceleration_skirt_brim} | |
; acceleration_support = {acceleration_support} |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<!-- Generated by: TmTheme-Editor --> | |
<!-- ============================================ --> | |
<!-- app: http://tmtheme-editor.herokuapp.com --> | |
<!-- code: https://github.com/aziz/tmTheme-Editor --> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>T6</string> |
OlderNewer