Skip to content

Instantly share code, notes, and snippets.

Working from home

Leo Dutra leodutra

Working from home
View GitHub Profile
leodutra /
Created Oct 16, 2021 — forked from jessy-lua/
New World oodle preset for QuickBMS
# ZIP files example 0.4.11
# more info:
# note that with some archives like those created by Stuff-it on MacOSX is
# not possible to use this script because they are wrongly built, practically
# they set the comp_size and uncomp_size fields of the "Local file header" at
# 0 and they set them only in the relative "Central directory structure" which
# means that it's necesary to read this one first for extracting the files
# contained in the local header... senseless and stupid
# script for QuickBMS
leodutra /
Created Aug 16, 2021 — forked from corenting/
Elite: Dangerous APIs findings
leodutra / - npm license values
Last active May 16, 2021 — forked from kemitchell/-
npm license values
View - npm license values
74925 NONE
54706 MIT
9268 ISC
3050 BSD
791 APACHE-2.0
699 APACHE 2.0
leodutra /
Created May 7, 2021 — forked from nicktoumpelis/
Cleans and resets a git repo and its submodules
git clean -xfd
git submodule foreach --recursive git clean -xfd
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive
leodutra / .gitlfstracks
Created Dec 25, 2020 — forked from bdombro/.gitlfstracks
Git LFS Default Tracks - Common binary file extensions
View .gitlfstracks
"To include this, run `cat .gitlfstrack | xargs git lfs track`"
leodutra /
Created Jan 10, 2020 — forked from brayoh/
How to think about monads

How to think about Monads

Initially, Monads are the biggest, scariest thing about Functional Programming and especially Haskell. I've used monads for quite some time now, but I didn't have a very good model for what they really are. I read Philip Wadler's paper Monads for functional programming and I still didnt quite see the pattern.

It wasn't until I read the blog post You Could Have Invented Monads! (And Maybe You Already Have.) that I started to see things more clearly.

This is a distillation of those works and most likely an oversimplification in an attempt to make things easier to understand. Nuance can come later. What we need when first learning something is a simple, if inaccurate, model.

This document assumes a beginner's knowledge of pure functional programming and Haskell with some brief encounters of Monads, e.g. [Functors, Applicatives, And

leodutra / kernel.js
Created Nov 26, 2019 — forked from Carreau/kernel.js
A node.js kernel for IPython notebook. You can see the explanation of the ipynb rendered in
View kernel.js
zmq = require("zmq")
fs = require("fs")
var config = JSON.parse(fs.readFileSync(process.argv[2]))
var connexion = "tcp://"+config.ip+":"
var shell_conn = connexion+config.shell_port
var pub_conn = connexion+config.iopub_port
var hb_conn = connexion+config.hb_port
leodutra / Office_kms
Created Aug 28, 2019 — forked from CHEF-KOCH/KMS_office.cmd
KMS server Windows
View Office_kms
cd\Program Files\Microsoft Office\Office16
cd\Program Files (x86)\Microsoft Office\Office16
cscript OSPP.VBS /
cscript OSPP.VBS /actcscript OSPP.VBS /dstatus
slmgr.vbs /ckms
leodutra /
Created Jun 29, 2019 — forked from johncantrell97/
How I Obtained Satoshi's Treasure Keys 1, 2, and 3 in Minutes

Today (April 16th 2019 at noon) the first major clues to discover key #1 was set to be released in a few cities. A QR code with the words 'orbital' were found at these locations and looked like this: ( If you read the QR code with your phone you will be directed to this url:

At this URL you are prompted to input a passphrase to decrypt the first shard. An obvious first guess was to try the word 'orbital' from the QR code. Not suprisingly this worked! This reveals a congratulations page and presents the first key shard:


Now, we were supposed to wait until April 17th to get clues from the other cities for keys #2 and #3 but that wouldn't stop me from digging around with all the new information we had. All that time "playing" notpron ( years ago was going to help me here.

The first thing I noticed was

leodutra / index.js Capture DOM elements screenshot using Chrome headless
View index.js
const puppeteer = require('puppeteer')
// Related Issues:
// 3118 -
async function main() {
const browser = await puppeteer.launch({
args: ['--start-maximized'],
headless: false,
defaultViewport: null