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
--------infosec yey
Penetration Testing Execution Standard
http://www.pentest-standard.org/index.php
ISIS Lab's Hack Night - An Intense Introduction to Offensive Security
https://github.com/isislab/Hack-Night/
FSU Offensive Computer Security
@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 / Dockerfile
Last active November 16, 2021 17:00
docker ssh container
FROM mcr.microsoft.com/dotnet/core/sdk:3.1.402-alpine3.12 as debugger-env
# Debugger
WORKDIR /dbg
COPY sdbg.sh .
COPY GetVsDbg.sh .
RUN ./GetVsDbg.sh -l . -v latest
# User SSH key
WORKDIR /root
@Luiz-Monad
Luiz-Monad / flat.ts
Last active November 6, 2021 01:34
type flatten and access
type ElementType<A extends { [key: string]: A[keyof A] }> = A[string];
type DeepRequired<T> = T extends Object ? { [K in keyof T]-?: DeepRequired<T[K]> } : Required<NonNullable<T>>;
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
type FLeaf<T, N> = { leaf: T; name: N }
type FNode<T, N> = { node: T; name: N }
@Luiz-Monad
Luiz-Monad / recurse.ts
Created November 5, 2021 23:14
Recursive type lift in typescript
type FLeaf<T, N> = { leaf: T; name: N }
type FNode<T, N> = { node: T; name: N }
type Fold<T> = {
[K in keyof T & string]:
Lift<T[K], K>
}[keyof T & string];
type Lift<T, K> =
@Luiz-Monad
Luiz-Monad / math.group.derivative.kotlin.kt
Created May 20, 2021 05:32
derivative/groups in kotlin
//diferentiable mathematical group/ring
//http://breandan.net/public/masters_thesis.pdf#page=58
interface Group<X : Group<X>>
object Top : Fun<Top>()
open class Const<T : Fun<T>>(val number : Double) : Fun<T>() { override fun toString() = "$number" }
class Sum<T : Fun<T>>(val left : Fun<T>, val right : Fun<T>) : Fun<T>() { override fun toString() = "($left + $right)" }
class Prod<T : Fun<T>>(val left : Fun<T>, val right : Fun<T>) : Fun<T>() { override fun toString() = "($left * $right)" }
class Var<T : Fun<T>>(val name: String) : Fun<T>() { override val vars: Set<Var<T>> = setOf(this) ; override fun toString() = "$name" }
@Luiz-Monad
Luiz-Monad / android_image_khr_2.cpp
Last active May 15, 2021 14:08
android hack to get buffers from gralloc
@@ -1,175 +0,0 @@
#include "GraphicBuffer.h"
#include <string>
#include <cstdlib>
#include <iostream>
#include <iostream>
#include <dlfcn.h>
const int GRAPHICBUFFER_SIZE = 1024;