Skip to content

Instantly share code, notes, and snippets.

View Lzok's full-sized avatar

Leandro Echevarria Lzok

  • Andromeda
View GitHub Profile
@na2hiro
na2hiro / Remix-request-cheatsheet.md
Last active March 18, 2024 02:42
Remix request cheatsheet
#!/usr/bin/awk -f
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff
# My copy here is written in awk instead of C, has no compelling benefit.
# Public domain. @thingskatedid
# Run as awk -v x=xyz ... or env variables for stuff?
# Assumptions: the data is evenly spaced along the x-axis
# TODO: moving average
" set the runtime path to include vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
" Specify a directory for plugins
" - For Neovim: stdpath('data') . '/plugged'
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
" Colors
Plug 'flazz/vim-colorschemes'
" Autocomplete

Haskell in Production: Adventures in Blockchain Building

console.log(Joi.validate('2015-02-21T00:52:43.822Z', Joi.date().iso())); // error:null
console.log(Joi.validate('2015-02-21T00:52:43.822', Joi.date().iso())); // error:null
console.log(Joi.validate('2015-02-21T00:52:43Z', Joi.date().iso())); // error:null
console.log(Joi.validate('2015-02-21T00:52:43', Joi.date().iso())); // error:null
console.log(Joi.validate('2015-02-21T00:52Z', Joi.date().iso())); // error:null
console.log(Joi.validate('2015-02-21T00:52', Joi.date().iso())); // error:null
console.log(Joi.validate('2015-02-21T00Z', Joi.date().iso())); // "value" must be a valid ISO 8601 date
@luciopaiva
luciopaiva / walksync.js
Last active October 29, 2020 20:24 — forked from kethinov/walksync.js
List all files in a directory in Node.js recursively in a synchronous fashion
#!/usr/bin/env node
const
path = require("path"),
fs = require("fs");
/**
* List all files in a directory recursively in a synchronous fashion
*
* @param {String} dir
@Godofbrowser
Godofbrowser / axios.refresh_token.1.js
Last active April 26, 2024 12:57 — forked from culttm/axios.refresh_token.js
Axios interceptor for refresh token when you have multiple parallel requests. Demo implementation: https://github.com/Godofbrowser/axios-refresh-multiple-request
// for multiple requests
let isRefreshing = false;
let failedQueue = [];
const processQueue = (error, token = null) => {
failedQueue.forEach(prom => {
if (error) {
prom.reject(error);
} else {
prom.resolve(token);
@tommmyy
tommmyy / ramdaDebounce.js
Last active October 19, 2023 15:14
Debounce function using Ramda.js
import { curry, apply } from 'ramda';
/**
* Debounce
*
* @param {Boolean} immediate If true run `fn` at the start of the timeout
* @param timeMs {Number} Debounce timeout
* @param fn {Function} Function to debounce
*
* @return {Number} timeout
@robfe
robfe / about.md
Last active December 20, 2022 21:56
Running localstack in docker for windows with persistence enabled

Running localstack in docker for windows with persistence enabled

Running on Docker for Windows

Localstack comes with a docker-compose file that won't quite work when you're running the (linux) container in docker for Windows.

Two changes need to be made:

The docker.sock volume won't work on windows

We can just comment that line out: