Skip to content

Instantly share code, notes, and snippets.

@luizfilipe
luizfilipe / killport.js
Created Jan 25, 2021
This script kills applications that are running on a given port
View killport.js
#!/usr/bin/env node
const { exec } = require('child_process')
const findNumber = arg => !isNaN(parseInt(arg, 10))
const port = process.argv.find(findNumber)
const execCommand = command =>
new Promise((resolve, reject) =>
@luizfilipe
luizfilipe / wsl-setup.md
Created Jan 25, 2021 — forked from mtobeiyf/wsl-setup.md
WSL + ZSH + Hyper Setup
View wsl-setup.md

My WSL Setup

A guide to setup your WSL with Hyper and zsh

Download & Install the WSL

  • Follow the very thorough instructions here

Get a prettier terminal

  • Download Hyper.js here - I went with the 'hyperblue' theme.
View priming-calculator.js
var sugar_data = [
{
"title": "Corn Sugar",
"search_term": "corn+sugar",
"factor": 4,
"weightfactor": 1,
"volumedivide": 200,
"volumefactor": 1
},
{
@luizfilipe
luizfilipe / .editorconfig
Last active Jan 21, 2020
.editorconfig to nodejs projects
View .editorconfig
[*]
indent_style = space
indent_size = 2
continuation_indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
@luizfilipe
luizfilipe / .jshintrc
Last active Jul 21, 2016
.jshintrc file to nodejs
View .jshintrc
{
"camelcase": true,
"eqeqeq": true,
"esnext": true,
"eqnull": true,
"indent": 2,
"latedef": true,
"newcap": true,
"node": true,
"quotmark": "single",
View .jshintrc
{
// --------------------------------------------------------------------
// JSHint Configuration, Strict Edition
// --------------------------------------------------------------------
//
// This is a options template for [JSHint][1], using [JSHint example][2]
// and [Ory Band's example][3] as basis and setting config values to
// be most strict:
//
// * set all enforcing options to true