Skip to content

Instantly share code, notes, and snippets.

View Luiz-Monad's full-sized avatar
💭
computing

Luiz Luiz-Monad

💭
computing
View GitHub Profile
@Luiz-Monad
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.
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 http://worrydream.com/refs/ -- using NimbleText.
//(TODO: Use regex or html agility pack to find them programmatically)
var refs = new string[] {
"Hamming-TheArtOfDoingScienceAndEngineering.pdf",
"Licklider-IntergalacticNetwork.pdf",
@Luiz-Monad
Luiz-Monad / pair_.md
Created July 3, 2022 00:12 — forked from caotic123/pair_.md
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
Luiz-Monad / raspbian.md
Created April 6, 2022 13:18 — forked from costerwi/raspbian.md
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
Luiz-Monad / decompress.ps1
Created December 12, 2021 18:10 — forked from vortexau/decompress.ps1
Powershell to decompress DEFLATE data
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)
$t.CopyTo($o)
$t.Close()
$o.Close()
$i.Close()
}
@Luiz-Monad
Luiz-Monad / AndroidNdkR22.props
Created March 1, 2021 19:37 — forked from jwtowner/AndroidNdkR22.props
Build with Android NDK r22 in MSVS 2019
<PropertyGroup Label="Globals">
<Keyword>Android</Keyword>
<MinimumVisualStudioVersion>16.0</MinimumVisualStudioVersion>
<ApplicationType>Android</ApplicationType>
<ApplicationTypeRevision>3.0</ApplicationTypeRevision>
<PlatformToolset>Clang_5_0</PlatformToolset>
<AndroidAPILevel Condition="'$(Platform)'=='ARM64'">android-21</AndroidAPILevel>
<AndroidAPILevel Condition="'$(Platform)'!='ARM64'">android-19</AndroidAPILevel>
<UseOfStl>c++_static</UseOfStl>
<ShowAndroidPathsVerbosity>Low</ShowAndroidPathsVerbosity>
@Luiz-Monad
Luiz-Monad / subPath.fsx
Created August 26, 2019 19:15 — forked from nojaf/subPath.fsx
Suave subPath
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
Luiz-Monad / modinverse.py
Last active January 18, 2021 00:20 — forked from ofaurax/modinverse.py
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
Luiz-Monad / Your language sucks.md
Last active September 22, 2017 00:12 — forked from P4/Your language sucks.md
Your programming language sucks

You appear to be advocating a new...

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

SOLID is FP!

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?.

C#

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