Skip to content

Instantly share code, notes, and snippets.

@luizfilipe
luizfilipe / killport.js
Created January 25, 2021 12:56
This script kills applications that are running on a given port
#!/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 January 25, 2021 12:54 — forked from imfing/wsl-setup.md
WSL + ZSH + Hyper Setup

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.
@luizfilipe
luizfilipe / .editorconfig
Last active January 21, 2020 00:07
.editorconfig to nodejs projects
[*]
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 / priming-calculator.js
Created September 5, 2016 08:01
priming-calculator.js
var sugar_data = [
{
"title": "Corn Sugar",
"search_term": "corn+sugar",
"factor": 4,
"weightfactor": 1,
"volumedivide": 200,
"volumefactor": 1
},
{
@luizfilipe
luizfilipe / .jshintrc
Last active July 21, 2016 15:10
.jshintrc file to nodejs
{
"camelcase": true,
"eqeqeq": true,
"esnext": true,
"eqnull": true,
"indent": 2,
"latedef": true,
"newcap": true,
"node": true,
"quotmark": "single",
{
// --------------------------------------------------------------------
// 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