Skip to content

Instantly share code, notes, and snippets.

View cameres's full-sized avatar

Connor Ameres cameres

View GitHub Profile
@anatolebeuzon
anatolebeuzon / README.md
Last active April 14, 2025 20:43
HyperLogLog large range correction bias

This is an experimental tool to evaluate the quality of the estimations produced by the HyperLogLog algorithm described in the Flajolet et al. paper, with and without the large range correction (§4 of the paper).

This correction is only enabled for cardinalities beyond 143M, so any input below that will return the same result twice.

Usage

go mod tidy
go run main.go -count 3000000000
@kylrth
kylrth / README.md
Last active September 12, 2022 06:56
Wake-on-LAN with tp-link TG-3468 on Ubuntu 18.04.3

WOL with tp-link TG-3468 on Ubuntu 18.04.3

I'm putting this here for my own reference because I was up way too late figuring this out.

After installing the network card, I could see I already had the right driver for it. sudo lshw -c network showed that the card was disabled though. What ended up getting the card working was the following which I recorded here:

sudo ip l s dev enp6s0 up
@Aaronmacaron
Aaronmacaron / install-alacritty-ubuntu.sh
Last active October 10, 2022 11:26
Install Alacritty on Ubuntu
#!/bin/bash
# This installs alacritty terminal on ubuntu (https://github.com/jwilm/alacritty)
# You have to have rust/cargo installed for this to work
# Install required tools
sudo apt-get install -y cmake libfreetype6-dev libfontconfig1-dev xclip
# Download, compile and install Alacritty
git clone https://github.com/jwilm/alacritty
@rbq
rbq / docker.yaml
Last active March 18, 2025 17:21
Install Docker CE on Ubuntu using Ansible
---
- hosts: all
tasks:
- name: Install prerequisites for Docker repository
apt:
name: ['apt-transport-https', 'ca-certificates', 'curl', 'gnupg2', 'software-properties-common']
update_cache: yes
- name: Add Docker GPG key
apt_key:
@rambabusaravanan
rambabusaravanan / .gitconfig
Last active March 4, 2025 16:34
Git Diff and Merge Tool - IntelliJ IDEA
# Linux
# add the following to "~/.gitconfig" file
[merge]
tool = intellij
[mergetool "intellij"]
cmd = /usr/local/bin/idea merge $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") $(cd $(dirname "$BASE") && pwd)/$(basename "$BASE") $(cd $(dirname "$MERGED") && pwd)/$(basename "$MERGED")
trustExitCode = true
[diff]
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active May 3, 2025 08:56
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@subfuzion
subfuzion / curl.md
Last active April 30, 2025 20:39
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@andytlr
andytlr / spotify-genres.md
Created January 22, 2016 02:26
Spotify Genres

Spotify has heaps of genres but there not surfaced in the UI. Here's 1383 (perhaps all) of them.

Search for genre:"Genre Name"

  1. A Cappella
  2. Abstract
  3. Abstract Beats
  4. Abstract Hip Hop
  5. Abstract Idm
  6. Abstractro