Skip to content

Instantly share code, notes, and snippets.

Avatar
👾
retro-wave driven development

Matthias Vandermaesen netsensei

👾
retro-wave driven development
View GitHub Profile
@netsensei
netsensei / elasticsearchinstall.md
Created May 16, 2022
Installation and initial setup of Elasticsearch on Fedora
View elasticsearchinstall.md

Installation and initial setup of Elasticsearch on Fedora

Installation of ES 6.8

$ sudo dnf install java-latest-openjdk
$ sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
$ cat <<EOF | sudo tee /etc/yum.repos.d/elasticsearch.repo
[elasticsearch-6.x]
name=Elasticsearch repository for 6.x packages
@netsensei
netsensei / postgresinstall.md
Last active May 16, 2022
Install PostgreSQL on Fedora Linux
View postgresinstall.md

Installation and initial setup of PostgreSQL for local use

Step 1: Installation of PostgreSQL

Add the YUM repo to your host:

$ sudo dnf install https://download.postgresql.org/pub/repos/yum/reporpms/F-34-x86_64/pgdg-fedora-repo-latest.noarch.rpm
View gist:7f23c7ec2e129d1667d9c695c94a3700
flowchart LR
W((World)) --- TR
TR --- KC(Keycloak)
BB --- KC
subgraph Nomad
TR(Traefik proxy) --- BB
BB(Biblio backend) --- NATS{NATS}
NATS --- JB{JMS bridge}
JB --- F(Fedora repository)
NATS --- IDX(Indexer service)
@netsensei
netsensei / gist:7c71b3215bbf440746151aafc4cfd84f
Last active Jan 8, 2022
Setting up a PI-Hole FTL DNS on a local network
View gist:7c71b3215bbf440746151aafc4cfd84f

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
@netsensei
netsensei / columsinperl.md
Last active Dec 17, 2020
Compare columns in 2 files with Perl
View columsinperl.md

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 / elastic.pl
Created Jun 16, 2020
Quick 'n dirty ElasticSearch via Catmandu/Perl (Part 1)
View elastic.pl
# 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 / webpack.config.js
Created Jun 10, 2020
Compile plain SCSS with Webpack
View webpack.config.js
// 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 / nodejs.md
Last active Jun 8, 2020
Setting up NodeJS with NVM on Centos 7
View nodejs.md

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 / ssh-background.md
Last active Mar 1, 2022
Creating and managing an SSH session in the background
View ssh-background.md