Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Leo Dutra leodutra

🏠
Working from home
View GitHub Profile
@brayoh
brayoh / ThinkAboutMonads.md
Created Jan 10, 2020 — forked from cscalfani/ThinkAboutMonads.md
How to think about monads
View ThinkAboutMonads.md

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

@corenting
corenting / ed_notes.md
Last active Aug 21, 2021
Elite: Dangerous APIs findings
View ed_notes.md
@johncantrell97
johncantrell97 / satoshistreasure.md
Last active Jul 16, 2021
How I Obtained Satoshi's Treasure Keys 1, 2, and 3 in Minutes
View satoshistreasure.md

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: (https://imgur.com/a/6rNmz7T). If you read the QR code with your phone you will be directed to this url: https://satoshistreasure.xyz/k1

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:

ST-0001-a36e904f9431ff6b18079881a20af2b3403b86b4a6bace5f3a6a47e945b95cce937c415bedaad6c86bb86b59f0b1d137442537a8.

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 (http://notpron.org/notpron/) years ago was going to help me here.

The first thing I noticed was

@simov
simov / README.md
Last active Sep 20, 2021
Run `node` scripts using `nvm` and `crontab` without hardcoding the node version
View README.md

Run node scripts using nvm and crontab without hardcoding the node version

cronjob.env.sh

#!/bin/bash

# NVM needs the ability to modify your current shell session's env vars,
# which is why it's a sourced function
@brianboyko
brianboyko / README.md
Last active Sep 9, 2021
VueJS Best Practices Guide
View README.md

Deverus Vue.js Style Guide

Guide for developing Vue.js applications.

v. 0.0.1

Vue.js is an amazing framework, which can be as powerful as Angular or React, the two big heavy hitters in the world of front-end frameworks.

However, most of Vue's ease-of-use is due to the use of Observables - a pattern that triggers re-renders and other function calls with the reassignment of a variable.

View Arch Linux mkinitcpio: Possibly missing firmware for module.md

Problem

In Arch Linux mkinitcpio -p linux

shows

Possibly missing firmware for module: aic94xx
 Possibly missing firmware for module: wd719x
@leodutra
leodutra / mad-node-modules.md
Created Jan 27, 2017
Awesome and mad Node modules collection
View mad-node-modules.md

peer-to-peer

  • peerwiki - all of wikipedia on bittorrent
  • simple-peer - send video/voice/data p2p in the browser (with webrtc)
  • torrent-docker - realtime boot of remote docker images over bittorrent
  • torrent-mount - mount a torrent as a filesystem
  • webtorrent - streaming torrent client for node & the browser

browserify

@leodutra
leodutra / arch-install.sh
Last active Oct 14, 2020
Arch Install GPT + GRUB
View arch-install.sh
# O live ISO do Arch é um CLI
# a instalação é iniciada como sudo automaticamente
# siga os passos...
# DEFINIR TECLADO ABNT2 PARA LIVE BOOT
loadkeys br-abnt2
# AUMENTAR FONTE DO TERMINAL DO LIVE BOOT
setfont lat4-19
@cryzed
cryzed / fix-infinality.md
Last active Sep 16, 2021
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.
View fix-infinality.md

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

@pylover
pylover / a2dp.py
Last active Sep 13, 2021
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04, 16.10 and also debian jessie, with bluez5.
View a2dp.py
#! /usr/bin/env python3
"""Fixing bluetooth stereo headphone/headset problem in debian distros.
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone.
This will be only fixes the bluez5 problem mentioned above .
Licence: Freeware