Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am yabbes on github.
* I am tschw (https://keybase.io/tschw) on keybase.
* I have a public key ASCo922sda0Z27PeZIccQMARy7nkLCscvDGJxgmo5FpEgQo
To claim this, I am signing this object:
@yabbes
yabbes / Mounting an encrypted USB drive (Luks) with udisksctl.md
Last active October 29, 2023 05:21
Mounting an encrypted USB drive (Luks) with udisksctl

See what's the block device

[yabbes@x220 ~]$ lsblk
NAME           MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda              8:0    0 298,1G  0 disk
├─sda1           8:1    0   500M  0 part  /boot
└─sda2           8:2    0 297,6G  0 part
  └─lvm        254:0    0 297,6G  0 crypt
    ├─vg0-swap 254:1    0     4G  0 lvm   [SWAP]
    ├─vg0-root 254:2    0    46G  0 lvm   /
@yabbes
yabbes / ARCH_INSTALL.MD
Last active August 13, 2018 09:25 — forked from heppu/ARCH_INSTALL.MD
Installing Arch with GPT, LUKS, LVM and systemd-boot

Create bootable USB

dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress && sync

Boot from USB and set prepare system

loadkeys <your-keymap>
@yabbes
yabbes / dwm-statusbar
Created March 27, 2018 20:09
dwm-statusbar
xrunning=~/.dwm/isrunning
touch "$xrunning"
cpu_temperatur() {
echo $(head -c 2 /sys/class/thermal/thermal_zone0/temp)C
}
while [[ -f "$xrunning" ]]; do
DATUM="$(date '+%R:%S')"
IPADDR="$(ip addr show enp7s0|grep inet |head -1 | awk '{print $2}')"

Keybase proof

I hereby claim:

  • I am yabbes on github.
  • I am tschw (https://keybase.io/tschw) on keybase.
  • I have a public key whose fingerprint is E2D6 6663 2BA9 49D8 0CD5 F502 0AF2 9E48 1030 F54F

To claim this, I am signing this object:

@yabbes
yabbes / gulpfile.js
Created August 10, 2017 12:09
Simple Gulp (browser-sync and gulp-watch for html/css changes)
// Super simple gulpfile just with browser-sync and gulp-watch
var gulp = require('gulp');
var browserSync = require('browser-sync');
var watch = require('gulp-watch');
gulp.task('default', function () {
watch(['./*.css', './*.html'], function() {
browserSync.reload();
@yabbes
yabbes / gulpfile.js
Created August 9, 2017 20:45 — forked from alkrauss48/gulpfile.js
Base gulpfile config for babel, browserify, and uglify - with sourcemaps and livereload
var gulp = require('gulp');
var browserify = require('browserify');
var babelify = require('babelify');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var uglify = require('gulp-uglify');
var sourcemaps = require('gulp-sourcemaps');
var livereload = require('gulp-livereload');
#!/usr/bin/awk -f
# y en avait un qui disait que c'est complétement débile d'apprendre awk
BEGIN {
}
{
if ( $0 ~ /awk/ ) { print $0 "<-- c'est débile\n";}
}
END {
}
#!/usr/bin/awk -f
BEGIN{
occ = 0
}
{
if (substr($0, length($0)-1, length($0)) == "[:space:]") {
printf("Space alert at line %d\n", NR)
print $0
occ += 1