Skip to content

Instantly share code, notes, and snippets.

@gtirloni
gtirloni / wsl-luks.md
Created May 2, 2022 12:44
Windows WSL2 and LUKS

If you have a LUKS-encrypted partition on another disk, it's easy to mount it inside WSL.

List your disks:

> wmic diskdrive list brief

Mount the whole disk inside WSL (using --bare so WSL doesn't attempt to mount it automatically):

@gtirloni
gtirloni / wsl-dropbox.md
Last active April 15, 2024 11:59
Windows WSL2 and Dropbox

This was only tested on Fedora 35 with systemd but should work on any WSL distribution that uses systemd.

Install the Dropbox headless client:

$ cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -

Install the Dropbox manager script into your ~/bin folder:

@gtirloni
gtirloni / ghactions-roadmap.txt
Last active July 28, 2020 16:53
GH Actions - Interesting work in progress
https://github.com/github/roadmap/issues/51
https://github.com/github/roadmap/issues/52
https://github.com/github/roadmap/issues/59
https://github.com/github/roadmap/issues/75
https://github.com/github/roadmap/issues/78
https://github.com/github/roadmap/issues/88
https://github.com/github/roadmap/issues/96
https://github.com/github/roadmap/issues/98
https://github.com/github/roadmap/issues/99
@gtirloni
gtirloni / mirror.sh
Created July 18, 2018 18:15
CentOS/Fedora mirror
#!/usr/bin/env bash
set -o errexit
set -o pipefail
set -o xtrace
LOCKFILE="${PWD}/$(basename "$0").lock"
LOCKFD=99
_lock() { flock -"$1" "$LOCKFD"; }
@gtirloni
gtirloni / lfs258.md
Created August 12, 2017 20:17
LFS258 Notes

etcd

List all keys

ETCDCTL_API=3 etcdctl get / --prefix --keys-only

What used to be directories in etcd v2

ETCDCTL_API=3 etcdctl get / --prefix --keys-only | awk -F/ '{ printf("%s/%s\n", $2, $3); }'| sort | uniq

@gtirloni
gtirloni / npm_cache.md
Last active July 8, 2017 14:34
Comparing local-npm and npm caching

Method

git clone https://github.com/GPII/universal
rm -rf node_modules
time npm install

npm 3.10.10

  • Run #1 - 3m3s (cold cache)
@gtirloni
gtirloni / notes.txt
Created December 10, 2015 18:18
Kubernetes Notes
kubernetes-client - Kubernetes client tools
/usr/bin/kubectl
kubernetes-master - Kubernetes services for master host
/etc/kubernetes
/etc/kubernetes/apiserver
/etc/kubernetes/config (**)
/etc/kubernetes/controller-manager
@gtirloni
gtirloni / Dockerfile
Created April 7, 2015 00:11
Using container volumes to root the host
FROM centos:7
EXPOSE 8080
RUN yum -y install epel-release
RUN yum -y install python-cherrypy
COPY hackme.py /tmp/
CMD ["/usr/bin/python", "/tmp/hackme.py"]