Skip to content

Instantly share code, notes, and snippets.

View wazazaby's full-sized avatar
🗿

Teddy Sommavilla wazazaby

🗿
View GitHub Profile
@nesk
nesk / README.md
Last active October 26, 2022 09:29
Delete the latest workflow runs of a repo (up to 100)

A fish oneliner to delete the latest workflow runs of a repo.

Install the GitHub CLI and replace <owner>/<repository> with your repository.

You can also change ?per_page=100 with the number of runs you want to delete.

@slok
slok / pprof.md
Last active June 11, 2024 00:04
Go pprof cheat sheet

Enable profiling

Default http server

import (
    _ "net/http/pprof"
    "net/http"
)
@CAFxX
CAFxX / golang_minimize_allocations.md
Last active May 22, 2024 00:58
Minimize allocations in Go

📂 Minimize allocations in Go

A collection of tips for when you need to minimize the number of allocations in your Go programs.

Use the go profiler to identify which parts of your program are responsible for most allocations.

⚠️ Never apply these tricks blindly (i.e. without measuring the actual performance benefit/impact). Most of these tricks cause a tradeoff between reducing memory allocations and other aspects (including e.g. higher peak memory usage, higher CPU usage, lower maintainability, higher probability of introducing subtle bugs). Only apply these tricks if the tradeoff in every specfic case is globally positive.

Protobuf

@AngerM
AngerM / http.go
Created October 30, 2018 03:25
High Performance Golang HTTP Client
package utils
import (
"context"
"io"
"io/ioutil"
"net"
"net/http"
"strings"
"time"
@gagarine
gagarine / fish_install.md
Last active June 5, 2024 20:25
Install fish shell on macOS Mojave with brew

Installing Fish shell on MacOS (Intel and M1) using brew

Fish is a smart and user-friendly command line (like bash or zsh). This is how you can instal Fish on MacOS and make your default shell.

Note that you need the https://brew.sh/ package manager installed on your machine.

Install Fish

brew install fish

Using O2D to Program Duck PCBs

Special Thanks to KacKLaPPen23 and iNViSiBiLiTi for making this guide possible and being generally excellent people!

Programming Duck PCBs with O2D is a notoriously shitty experience.

Luckily with O2D 1.10 and this guide it will be less shitty!

Prerequisites

@Ashton-W
Ashton-W / Issue.md
Last active June 14, 2024 15:27
GitHub Markdown toggle code block
Click to toggle contents of `code`
CODE!
@Avaq
Avaq / combinators.js
Last active June 22, 2024 19:27
Common combinators in JavaScript
const I = x => x
const K = x => y => x
const A = f => x => f (x)
const T = x => f => f (x)
const W = f => x => f (x) (x)
const C = f => y => x => f (x) (y)
const B = f => g => x => f (g (x))
const S = f => g => x => f (x) (g (x))
const S_ = f => g => x => f (g (x)) (x)
const S2 = f => g => h => x => f (g (x)) (h (x))