Skip to content

Instantly share code, notes, and snippets.

View SpectralHiss's full-sized avatar

Houssem El Fekih SpectralHiss

  • Free man
  • London, UK
View GitHub Profile
@arnold-almeida
arnold-almeida / symlinks->hardlinks
Created October 10, 2010 12:08
Convert symlinks to hard links in a dir
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active November 9, 2024 08:57
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1
@craigfurman
craigfurman / update_libs.sh
Last active September 21, 2015 11:00
Update Go dependencies after installing a new language version
go list -f '{{join .Deps "\n"}}' ./... | xargs go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}' | xargs go install -a
@subfuzion
subfuzion / curl.md
Last active November 17, 2024 03:54
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.

@xpepper
xpepper / tdd-outside-in-mancuso-style.md
Last active October 20, 2024 18:35
Sandro Mancuso on Outside-In TDD

I'm putting here some of the things Sandro said in his 3-part session on Outside-In TDD (see the github repo here), and highlights some parts that are significant to me.

Sandro Mancuso on Outside-In TDD

TDD does not lead to a good design if you don't know what a good design looks like.

The way I code in this video is the way I normally code but not the way I normally teach.

Some of you will notice that I skip the traditional refactoring steps a few times and I do quite a lot of design up-front (or "just in time design" as I prefer to call it) without much feedback from my code.

@jmound
jmound / refresh.sh
Last active August 7, 2023 10:33
Bash function to refresh all pods in all deployments by namespace
# based on the "patch deployment" strategy in this comment:
# https://github.com/kubernetes/kubernetes/issues/13488#issuecomment-372532659
# requires jq
# $1 is a valid namespace
function refresh-all-pods() {
echo
DEPLOYMENT_LIST=$(kubectl -n $1 get deployment -o json|jq -r .items[].metadata.name)
echo "Refreshing pods in all Deployments"
for deployment_name in $DEPLOYMENT_LIST ; do
@huntrar
huntrar / full-disk-encryption-arch-uefi.md
Last active November 10, 2024 10:43
Arch Linux Full-Disk Encryption Installation Guide [Encrypted Boot, UEFI, NVMe, Evil Maid]

Arch Linux Full-Disk Encryption Installation Guide

This guide provides instructions for an Arch Linux installation featuring full-disk encryption via LVM on LUKS and an encrypted boot partition (GRUB) for UEFI systems.

Following the main installation are further instructions to harden against Evil Maid attacks via UEFI Secure Boot custom key enrollment and self-signed kernel and bootloader.

Preface

You will find most of this information pulled from the Arch Wiki and other resources linked thereof.

Note: The system was installed on an NVMe SSD, substitute /dev/nvme0nX with /dev/sdX or your device as needed.

@chaoxu
chaoxu / leetcode.md
Last active November 8, 2024 03:20
Interesting leetcode problems

This is an index of leetcode problems that I find interesting.

You can see many theoretical solutions by hqztrue here.

TCS Problems

Likely only people who work in the area knows the current best solution. The best solution is either in some paper, or requires advanced tricks.

  • 001 2SUM
  • 004 Median of Two Sorted Arrays
@xor-gate
xor-gate / Jenkinsfile
Created October 2, 2019 12:30 — forked from merikan/Jenkinsfile
Some Jenkinsfile examples
Some Jenkinsfile examples

Notes from reading Practical Go

Notes of the key points copied/summarised from Dave Cheney's Practical Go for more concise reading/reference.

It's worth reading the original document as there is more exposition there of the ideas presented.

These are terse notes only; I'm not providing my own commentary, opinion