Skip to content

Instantly share code, notes, and snippets.

View gist:0521c7b01a5e5675aa1f16e5e49fae16
### 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 Apr 2, 2018
Mounting an encrypted USB drive (Luks) with udisksctl
View Mounting an encrypted USB drive (Luks) with udisksctl.md

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 Aug 13, 2018 — forked from heppu/ARCH_INSTALL.MD
Installing Arch with GPT, LUKS, LVM and systemd-boot
View ARCH_INSTALL.MD

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>
View 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}')"
View keybase.md

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 Aug 10, 2017
Simple Gulp (browser-sync and gulp-watch for html/css changes)
View gulpfile.js
// 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 Aug 9, 2017 — forked from alkrauss48/gulpfile.js
Base gulpfile config for babel, browserify, and uglify - with sourcemaps and livereload
View gulpfile.js
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');
View debile.awk
#!/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 {
}
View nospaces
#!/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