Skip to content

Instantly share code, notes, and snippets.

View aziis98's full-sized avatar

Antonio De Lucreziis aziis98

View GitHub Profile
@aziis98
aziis98 / extract_test.go
Created February 16, 2022 23:57
Go extract experiments
package extract_test
import (
"regexp"
"strings"
"testing"
)
func lines(source string) chan string {
output := make(chan string)

Non global slowing message queue

As in the title

Example

async function fakeProvider(onData) {
    onData('line 1');
 onData('line 2');
@aziis98
aziis98 / sync.md
Last active January 26, 2022 12:56
Syncronization Primitives Equivalence
@aziis98
aziis98 / !launch.md
Last active January 19, 2022 04:56
Launch commands in new detached tmux sessions.

Tmux launcher

Launch commands in a new detached tmux session. This needs tmux and sqlite3 to be installed, see launch --help for usage.

Sqlite is used for storing the command history in ~/.cache/aziis98.scripts.launch/history.db that can be run with launch past <SESSION_NAME>.

Info

@aziis98
aziis98 / !symlink-manager.md
Last active January 19, 2022 04:47
Script to automatically symlink all scripts to the correct directories with the TARGET_PATH directive.

My Scripts

Some of my scripts (bashrc, ...)

  • bashrc
  • ...

Esercizio

Option<T> := None | Some T
List<T> := Nil | Append List<T> T
Tree<T> := Leaf T | Branch List<Tree<T>>

Si possono anche assumere funzioni comode come get :: (List<T>, Int) -> T

const apiResponse1 = {
post: "Questa è la domanda di questo thread",
votes: 1,
timestamp: "un po' di fantasia",
children: [
{
content: "Questa è la prima riposta",
votes: 1,
timestamp: "un po' di fantasia",
children: []
@aziis98
aziis98 / !README.md
Created May 2, 2021 00:15
Small snippet of JS to generate some random looking text instead of using lorem ipsum.

Random-Looking Text

Small snippet of JS to generate some random looking text instead of using lorem ipsum.

Usage

In HTML put some <span class="random-text"></span>