Skip to content

Instantly share code, notes, and snippets.

View netsensei's full-sized avatar
👾
retro-wave driven development

Matthias Vandermaesen netsensei

👾
retro-wave driven development
View GitHub Profile
@netsensei
netsensei / folders.yaml
Last active May 14, 2018 14:45
Folder structuur
root:
- 00_personeel:
- veiligheid:
- naam: Jos
permissies: alleen-lezen
type: persoon
- naam: Nancy
permissies: lezen, schrijven
type: persoon
- naam: personeel
@netsensei
netsensei / met.sh
Last active November 10, 2018 17:44
Scrape the Metropolitan Museum API
#!/bin/bash
echo "fetching list of objects";
curl -s "https://collectionapi.metmuseum.org/public/collection/v1/objects" > list.json;
echo "[]" > objects.json;
echo "drawing list of objects";
ids=$(jq -r '.objectIDs | .[]' list.json);
rm list.json;
@netsensei
netsensei / dell-xps-9380.md
Last active June 19, 2024 13:49
Installing Fedora 30/31 on Dell XPS 13 9380

Installing Fedora 30/31 on a Dell XPS 13 9380 series in dual boot mode

This guide describes how to install Fedora 30/31 next to Windows 10 on a Dell XPS 13 9380 series in dual boot.

  • Keep the stock Windows 10 installation that came with the laptop.
  • Install Fedora 30 alongside Windows on the hard disk.
  • Install GRUB as the bootloader allowing you to choose which OS to boot from.

Authored: September 2019

@netsensei
netsensei / ssh-background.md
Last active March 26, 2026 08:33
Creating and managing an SSH session in the background
@netsensei
netsensei / nodejs.md
Last active June 8, 2020 15:05
Setting up NodeJS with NVM on Centos 7

Setting Up NodeJS with NVM on Centos 7

Centos 7 offers NodeJS and NPM via yum install. While this is great, it's not optimal because it pins users to the version offered via yum. Moreover, a yum update can easily upgrade the NodeJS version leading to all kinds of breaking. Not what we want.

Luckily, nvm can help us.

In the same vain as rbenv, rvm or plenv: this is a version manager that leaves the "system" node installation alone and allows you to install and manage different versions of nodejs and npm concurrently.

@netsensei
netsensei / webpack.config.js
Created June 10, 2020 15:11
Compile plain SCSS with Webpack
// Easily compile plain SCSS or SASS if you want to use Webpack
// but you're not working on a JS project (React, Typescript, whathaveyou)
//
// Why? Webpack does what Grunt/Gulp does with half the configuration.
// See: https://alligator.io/tooling/webpack-gulp-grunt-browserify/
//
// You will need:
// npm install --save-dev autoprefixer
// npm install --save-dev css-loader
// npm install --save-dev file-loader
@netsensei
netsensei / elastic.pl
Created June 16, 2020 13:56
Quick 'n dirty ElasticSearch via Catmandu/Perl (Part 1)
# assuming catmandu.yml in the same folder as this script
# Change bag("document") to the relevant bag name / document type in ES
# ensure camtandu.yml exists!
use Catmandu::Sane;
use Config::Onion;
use Catmandu;
use Path::Tiny;
use Data::Dumper;
@netsensei
netsensei / columsinperl.md
Last active January 1, 2023 09:25
Compare columns in 2 files with Perl

Comparing two files each containing a single column dataset with Perl

Warning! One liners such as these are basically hacks. Please look into the comm program which is part of GNU Coreutils. It basically does all of this without any of the complexity below. See: https://www.gnu.org/software/coreutils/manual/html_node/comm-invocation.html

You have 2 text files, each containing rows of data each having 1 column (e.g. e-mail address, uuids, names, md5 hashes,...). You want to very quickly compare those, spending the least amount of time and energy, looking for ...

  • ... rows both files have in common (intersection)
  • ... rows which are in file A but not in file B.
  • ... rows which are in file B but not in file A.
@netsensei
netsensei / gist:7c71b3215bbf440746151aafc4cfd84f
Last active March 31, 2026 18:26
Setting up a PI-Hole FTL DNS on a local network

Setuping PI-Hole FTL DNS on a local network

pihole comes with it's own lightweight DNS server called FTL. It's geared towards easy of use. Even so, setting up this feature can be hard. Here are some lessons I've learned.

In this example:

  • Your network is setup on 192.168.1.0/24
  • 192.168.1.1 is your DHCP server and IP gateway. (usually your router)
  • 192.168.1.254 is the host running pi-hole