Skip to content

Instantly share code, notes, and snippets.

View jchristgit's full-sized avatar
🐍
#OpenErlang

jchristgit

🐍
#OpenErlang
View GitHub Profile
@bagder
bagder / curl-in-two-hours-agenda.md
Last active February 17, 2024 12:08
Master curl in two hours. A video course by Daniel

The idea is to make a two and a half hour (give or take) video course explaining and detailing curl, the command line tool. How it works, how to use it, from the basics to some more advanced uses. This will be done by Daniel Stenberg, founder and lead developer of the curl project.

The recording and live-stream is scheduled for August 31, 2023. In the US morning and Euro evening.

See blog post for details.

The project (10 min)

@chapmanjacobd
chapmanjacobd / btrfs_is_fun.md
Last active November 26, 2023 18:26
BTRFS single mode evaluation

The experiment

Preparation

truncate -s20G d1.img
truncate -s20G d2.img
truncate -s20G d3.img
truncate -s20G d4.img
set ld1 (sudo losetup --show --find d1.img)
@moyix
moyix / killbutmakeitlooklikeanaccident.sh
Created February 5, 2022 22:51
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
@NicholasG04
NicholasG04 / update-azure.ps1
Last active March 7, 2022 20:46
Update Azure AD User Display Name with Given Name + Surname
# Note, this won't work if your tenant is using unilateral Azure AD Link, change it locally for that (also not too difficult)
# Install the necessary Microsoft Graph modules
Install-Module -Name Microsoft.Graph.Authentication,Microsoft.Graph.Users -Scope CurrentUser
# Use new Graph API
Select-MgProfile -Name "beta"
# Sign In
Connect-MgGraph -Scopes "User.ReadWrite.All"
@glaucoleme
glaucoleme / AptOffline.md
Created September 1, 2020 12:10
Apt Offline on Ubuntu 18.04 (how to use and install)
@benpeoples
benpeoples / readme.txt
Created June 1, 2020 16:03
ESP32 LEDC Maximum frequency by resolution
Per this forum post: https://esp32.com/viewtopic.php?t=6701
The way to calculate max PWM frequency is integer (log 2 (LEDC_APB_CLK / frequency))
With a LEDC_APB_CLK == 80MHz, these are the following maximum values, in Hz:
LEDC_TIMER_1_BIT, 40000000
LEDC_TIMER_2_BIT, 20000000
LEDC_TIMER_3_BIT, 10000000
LEDC_TIMER_4_BIT, 5000000
LEDC_TIMER_5_BIT, 2500000
@dianjuar
dianjuar / i3-shortcuts-screenshot.md
Last active April 24, 2024 15:10
My i3 shortcuts to take screenshots

Requirements

  • maim
  • xclip

Set-up

Set this on your i3 config file ~/.i3/config

# Screenshots
@MawKKe
MawKKe / cryptsetup-with-luks2-and-integrity-demo.sh
Last active April 29, 2024 21:19
dm-crypt + dm-integrity + dm-raid = awesome!
#!/usr/bin/env bash
#
# Author: Markus (MawKKe) ekkwam@gmail.com
# Date: 2018-03-19
#
#
# What?
#
# Linux dm-crypt + dm-integrity + dm-raid (RAID1)
#
@arkady-emelyanov
arkady-emelyanov / haproxy.cfg
Last active October 25, 2023 22:02
haproxy check: postgresql is master
# Sample haproxy postgresql master check
#
# haproxy listen: 5431
# pg, instance #1 listen: 5432 (master node)
# pg, instance #2 listen: 5433 (replica node)
# external failover, promoting replica to master in case of failure
# passwordless auth for user web
# template1 database is accessible by user web
#
# haproxy will pass connection to postgresql master node:
@etuttle
etuttle / docker-registry-caching-proxy.conf
Created February 14, 2017 23:54
NGINX config for a caching proxy that sits in front of a docker registry
upstream docker-mirror-upstream {
server upstream.example.com;
}
proxy_cache_path /var/lib/docker-mirror/cache levels=1:2 max_size=10g inactive=48h keys_zone=cache:10m;
server {
listen 80 default_server;
listen 443 ssl default_server;