Skip to content

Instantly share code, notes, and snippets.

View luizbafilho's full-sized avatar

Luiz Filho luizbafilho

View GitHub Profile
module Request
[:get, :post, :put, :delete].each do |verb|
define_method verb do |url, payload: {}, headers: {}|
headers = define_headers(headers)
execute(verb, url, payload, headers)
end
end
def define_headers(headers)
default_headers = {
@luizbafilho
luizbafilho / Makefile
Created February 22, 2017 01:36 — forked from isaacs/Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@luizbafilho
luizbafilho / auth.lua
Created May 17, 2017 01:42 — forked from fur-q/auth.lua
nginx rtmp/hls server setup
-- add users:
-- $ htpasswd -s -c /etc/nginx-rtmp/.htpasswd streamname
-- stream:
-- $ ffmpeg -i foo.mp4 -c copy -f flv rtmp://abc.de/streamname?auth=password
local users = {}
for line in io.lines("/etc/nginx-rtmp/.htpasswd") do
local user, pass = line:match("([^:]+):{SHA}([^\n]+)")
users[user] = pass
end
Verifying my Blockstack ID is secured with the address 1BHqsLSKBMzbkndfHdWuydkVPUtJLvt2pF https://explorer.blockstack.org/address/1BHqsLSKBMzbkndfHdWuydkVPUtJLvt2pF
@luizbafilho
luizbafilho / perf_overview.md
Last active September 18, 2019 12:55
Performance overview from K6

k6 performance overview

In order to get a general idea of how k6 is performing, and to see if there are any low-hanging fruit in terms of optimizations we could do, I did a series of tests running k6 against a local server, testing different changes to the k6 code base.

Local environment

macOS High Sierra 10.13.13
MacBook Pro(Retina, 15-inch, Mid 2014)
Processor: 2,2Ghz Intel Core i7
Memory: 16GB 1600MHz DDR3

Keybase proof

I hereby claim:

  • I am luizbafilho on github.
  • I am luizbafilho (https://keybase.io/luizbafilho) on keybase.
  • I have a public key whose fingerprint is C981 304D 8AEF 5CF1 93BD AA02 8E3C B2E4 7A69 332C

To claim this, I am signing this object:

# deps: requests furl beautifulsoup4 flask
import requests
from bs4 import BeautifulSoup as Soup
import http
import pathlib
import furl
import urllib
import re
import csv
あげる
間・あいだ(に)
あまり
ある
あとで
ばかり
ばよかった
だい
だけ
// ==UserScript==
// @name JPDB grammar tagger
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://jpdb.io/review*
// @icon https://www.google.com/s2/favicons?sz=64&domain=github.com
// @grant none
// ==/UserScript==
[
"だ",
"です",
"は",
"も",
"これ",
"それ",
"あれ",
"の",
"いい",