Skip to content

Instantly share code, notes, and snippets.

View Luiz-Monad's full-sized avatar
magic monads

Luiz Luiz-Monad

magic monads
View GitHub Profile
Luiz-Monad / Download_Worry_Dream_References.linq
Created August 16, 2022 21:48 — forked from secretGeek/Download_Worry_Dream_References.linq
LinqPad script that downloads all PDFs/etc from Bret Victors worry dream refs page.
View Download_Worry_Dream_References.linq
void Main()
// LinqPad script that downloads all PDFs/etc from Bret Victors worry dream refs page.
var targetPath = @"PATH_TO_WHERE_YOU_KEEP_YOUR_EBOOK\eBooks";
//These filenames were extracted from -- using NimbleText.
//(TODO: Use regex or html agility pack to find them programmatically)
var refs = new string[] {
Luiz-Monad /
Created July 3, 2022 00:12 — forked from caotic123/
C++ : A functional analysis of immutable pair construction

Abstraction type system

Type system is a construction for guarantees safely in a language, though exist many other aplications like metaprogramming... It's means that i can writes a program but with a safe way, sure it's is perfect why it's solve many problems that programmers has after of compilation. The main idea that i can encode and represent a subset of solutions with a safe type system and better maybe the type can help me represent that.

Data representing

Ok it's mean i have a safe type system and i could represent my types of data..... Ok sure...., but no... limited type system have a weak power of abstraction(no i am not talking about c++ but yes a little part of the language).

The problem of "pair"

Let's go represent a pair: Pair is a tuple of the two values like (P x y), where x and y are values, in this discussion the values x and y can be encode a T type and a Tuple T type.

Luiz-Monad /
Created April 6, 2022 13:18 — forked from costerwi/
Raspbian startup

Normal Raspbian startup sequence

/usr/bin/raspi-config is a shell script to change some of the following options. docs

  1. /etc/inittab sets the default runlevel and runs /etc/init.d/rc to execute startup scripts.
  2. /etc/rc3.d/S03lightdm launches lightdm for runlevel 3.
  3. /etc/lightdm/lightdm.conf contains configuration options for lightdm, including autologin-user
  4. /etc/X11/Xsession sources all files in /etc/X11/Xsession.d
  5. /etc/X11/Xsession.d/50x11-common_determine-startup will set STARTUP to either ~/.xsession or ~/.Xsession if it exists. If not executable, it will prepend ${SHELL:-sh}. The default is STARTUP=/usr/bin/x-session-manager which is linked to /etc/alternatives/x-session-manager which is linked to /usr/bin/startlxde-pi
  6. lxde is the "Lightweight X11 Desktop Environment"
  7. `/usr/bin/startlxde
Luiz-Monad / decompress.ps1
Created December 12, 2021 18:10 — forked from vortexau/decompress.ps1
Powershell to decompress DEFLATE data
View decompress.ps1
function extract($i, $o) {
$i = [System.IO.File]::OpenRead($i)
$o = [System.IO.File]::OpenWrite($o)
$t = New-Object System.IO.Compression.DeflateStream($i, [System.IO.Compression.CompressionMode]::Decompress)
Luiz-Monad / AndroidNdkR22.props
Created March 1, 2021 19:37 — forked from jwtowner/AndroidNdkR22.props
Build with Android NDK r22 in MSVS 2019
View AndroidNdkR22.props
<PropertyGroup Label="Globals">
<AndroidAPILevel Condition="'$(Platform)'=='ARM64'">android-21</AndroidAPILevel>
<AndroidAPILevel Condition="'$(Platform)'!='ARM64'">android-19</AndroidAPILevel>
Luiz-Monad / subPath.fsx
Created August 26, 2019 19:15 — forked from nojaf/subPath.fsx
Suave subPath
View subPath.fsx
open System
open Suave
open Suave.Filters
let subPath path (ctx:HttpContext) =
async {
let localPath = ctx.request.url.LocalPath
let result =
match (localPath.StartsWith(path)) with
| false -> None
Luiz-Monad /
Last active January 18, 2021 00:20 — forked from ofaurax/
RSA in python
#!/usr/bin/env python3
p = 101149
q = 201829
def gcd(a, b):
while b:
a, b = b, a%b
return a
Luiz-Monad / Your language
Last active September 22, 2017 00:12 — forked from P4/Your language
Your programming language sucks
View Your language

You appear to be advocating a new...

  • Functional
  • Imperative
  • Object-oriented
  • Procedural
  • Stack-based
  • "Multi-paradigm"
  • Lazy
  • Eager
Luiz-Monad /
Last active February 4, 2020 13:14 — forked from anabastos/
Solid is FP - Luiz Stangarlin


So, I decided to write a little thing, only to practice writing, it's about SOLID being compared between class-based-OO and FP, and there will be grammar errors and there will be a lot of formatting errors, 'bear' with me as I type this as fast as I can. Also correct if I'm wrong. Warning, wall of text in English.

Single responsibility principle

" a class should have only a single responsibility " A pure function is something with a single responsibility, turning its input into an output. What could be simpler?.


Luiz-Monad /
Last active January 30, 2020 16:33 — forked from mloskot/
Watched Lectures Log (programming, mathematics, algorithms, databases, etc.)