Skip to content

Instantly share code, notes, and snippets.

View johnnyasantoss's full-sized avatar
🤓
Learning

Johnny Santos johnnyasantoss

🤓
Learning
View GitHub Profile
@RobinLinus
RobinLinus / covenants.md
Last active May 30, 2023 16:56
A collection of resources related to covenants
View covenants.md
@XSystem252
XSystem252 / RaspberryPi4Archlinux64EncryptionUSBBootBtrfsGuide.md
Last active October 22, 2023 11:50
How To Set Up a Raspberry Pi 4 with Archlinux 64-bit (AArch64) and Full Disk Encryption (+SSH unlock), USB Boot (No SD-Card) and btrfs
View RaspberryPi4Archlinux64EncryptionUSBBootBtrfsGuide.md

How To Set Up a Raspberry Pi 4 with Archlinux 64-bit (AArch64) and Full Disk Encryption (+SSH unlock), USB Boot (No SD-Card) and btrfs

Written by: XSystem
First published on: 20 Dec 2020
Last updated on: 20 Dec 2020

[0] Introduction

Overview

@keilmillerjr
keilmillerjr / Creating an AUR Package.md
Last active November 30, 2023 22:46
How to create and manage an AUR package. #AUR #ARCH #makepkg #PKGBUILD
View Creating an AUR Package.md
@laanwj
laanwj / blocktoimg.py
Last active August 10, 2020 17:54
tools to write (block) data to png files and vice versa
View blocktoimg.py
#!/usr/bin/env python3
# Distributed under the MIT software license
import binascii, struct, sys, io, argparse
from PIL import Image
IMG_WIDTH = 512 # could be made adaptive...
MIN_HEIGHT = 4 # minimum height of image; twitter won't let us upload anything smaller
BYTES_PER_PIXEL = 4 # RGBA, 8 bit
def div_roundup(x,y):
@guilhermednt
guilhermednt / check_intermedium_private_key_leak.sh
Created May 9, 2018 23:08
Verifying Banco Intermedium's private key leak
View check_intermedium_private_key_leak.sh
# Today the twitter user @ayubio said he had received the private key for a Brazillian bank's HTTPS certificate:
# - https://twitter.com/ayubio/status/994260981294469120
# - https://twitter.com/ayubio/status/994262029929246722
# - https://twitter.com/ayubio/status/994277992351391744
# To prove he actualy had the key, another user asked him to sign a message with such key and so he did:
# - http://pastebin.xyz/p?q=bXllODA
# The commands bellow will check that signature
# Store the message in a file (tweet.txt) in the same way @ayubio did:
@PaulSec
PaulSec / certstream_watchdog_paypal.py
Created November 6, 2017 15:27
certstream utility to retrieve paypal and few other fraud keywords
View certstream_watchdog_paypal.py
import certstream
keywords = ['paypal', 'paypol']
def extract_domains(domains):
res = []
for domain in domains:
for keyword in keywords:
if keyword in domain:
res.append(domain)
@mgravell
mgravell / Odd findings.txt
Last active April 19, 2017 10:39
async; ValueTask vs Task
View Odd findings.txt
Objective: compare Task<T> vs ValueTask<T> in a scenario that should
be ideal for ValueTask<T> - non-trivial results, but usually (always)
already completed.
Hypothesis: ValueTask<T> should be more efficient, as it does not (in
the "already completed" case) involve allocation.
Methodology: create a test rig that computes a number using multiple
nested roll-up operations, comparing sync vs async-Task<T> vs async-ValueTask<T>;
use "async"/"await" for the rollups in the async cases. Run all tests using
@jean-lourenco
jean-lourenco / dapper.cs
Last active April 7, 2017 19:45
Exemplo de queries com o Dapper
View dapper.cs
public static void Main()
{
var paraCadastrar = new []
{
new { Chave = "CSVDEFAULT", Descricao = "Descrição detalhada (ou não)" },
new { Chave = "JSONDEFAULT", Descricao = "Descrição detalhada (ou não)" },
new { Chave = "YAML", Descricao = "Descrição detalhada (ou não)" },
new { Chave = "INIT", Descricao = "Descrição detalhada (ou não)" },
new { Chave = "CONFIG", Descricao = "Descrição detalhada (ou não)" },
new { Chave = "BSON", Descricao = "Descrição detalhada (ou não)" },
@so0k
so0k / kubectl.md
Last active November 20, 2023 16:36
Playing with kubectl output
View kubectl.md

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@lukechilds
lukechilds / get_latest_release.sh
Created August 9, 2016 19:43
Shell - Get latest release from GitHub
View get_latest_release.sh
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4