Skip to content

Instantly share code, notes, and snippets.


Jose Quintana joseluisq

View GitHub Profile
joseluisq /
Created March 13, 2023 00:21
A generic Static Web Server load testing comparison between 2.15.0 and 2.14.2 versions.

Static Web Server 2.15.0 vs 2.14.2

A generic Static Web Server load testing comparison between 2.15.0 and 2.14.2 versions.

$ static-web-server -d ./public


joseluisq / interfaces
Last active November 13, 2022 00:14
Alpine Linux auto Ethernet Configuration - /etc/network/interfaces
View interfaces
auto eth0
iface lo inet loopback
iface eth0 inet dhcp
joseluisq / json.lua
Created October 18, 2022 20:17 — forked from tejaskokje/json.lua
LUA script to dump JSON output from wrk/wrk2
View json.lua
-- example reporting script which demonstrates a custom
-- done() function that prints results as JSON
done = function(summary, latency, requests)
io.write("\nJSON Output:\n")
io.write(string.format("\t\"requests\": %d,\n", summary.requests))
io.write(string.format("\t\"duration_in_microseconds\": %0.2f,\n", summary.duration))
io.write(string.format("\t\"bytes\": %d,\n", summary.bytes))
io.write(string.format("\t\"requests_per_sec\": %0.2f,\n", (summary.requests/summary.duration)*1e6))
joseluisq /
Last active September 26, 2022 19:01
How to open in file/line number with VSCode from Hotspot

How to open a file/line number with VSCode from Hotspot

  1. Open Hotspot
  2. Settings > Code navigation > Custom...
  3. Then Copy/paste the lines below
/usr/bin/code -g %f:%l:%c
  1. On for example Caller/Callee tab, right click on file location wanted.
  2. Finally, click open in editor
joseluisq / settings.json
Created June 20, 2022 10:11
My custom VSCode settings for Mac
View settings.json
// ---- Editor ----
"editor.fontFamily": "Fira Code",
"editor.fontSize": 12,
"editor.fontLigatures": true,
"editor.detectIndentation": true,
"editor.wordWrap": "on",
"editor.formatOnSave": false,
"editor.rulers": [

Keybase proof

I hereby claim:

  • I am joseluisq on github.
  • I am joseluisq ( on keybase.
  • I have a public key ASCqLTIgaAbKLdRO9_EgKnYlH747jhjMPp_qFwFOcklXtgo

To claim this, I am signing this object:

joseluisq / env.ts
Last active May 10, 2022 08:54
Get a Typescript typed environment variable value from `process.env` (NodeJS) with type casting for booleans, strings and numbers
View env.ts
* Return an environment variable typed value from `process.env`.
* It also supports a default value in case of `undefined`.
* The function will follow these steps to take a typed value:
* 1. First it will try to get the env value from `process.env`.
* 2. Then if `undefined` then it try with the default environment variable value if defined.
* 3. Otherwise if the default value is `undefined` then it will return the Javascript default values:
* - Boolean: `false`
* - String: `""`
View 40-libinput.conf
# Match on all types of devices but joysticks
# If you want to configure your devices, do not copy this file.
# Instead, use a config snippet that contains something like this:
# Section "InputClass"
# Identifier "something or other"
# MatchDriver "libinput"
# MatchIsTouchpad "on"
joseluisq /
Created June 27, 2021 21:03
A simple Nginx `try_files` directive parsing example written in Rust
enum Token {
/// Parses the Nginx-like `try_files` directive string and returns a vector of tokens.
pub fn parse(val: &str) -> Vec<String> {
let mut kind = Token::Start;
let mut token = String::new();