Skip to content

Instantly share code, notes, and snippets.

View errikos's full-sized avatar
☣️
Compilers cannot feel pain, but you can.

Ergys Dona errikos

☣️
Compilers cannot feel pain, but you can.
View GitHub Profile
@errikos
errikos / netplan-preseed+full.cfg
Created June 25, 2025 08:37
Debian bookworm netplan preseed
d-i preseed/late_command string in-target apt-get -y install netplan.io systemd-resolved
@errikos
errikos / openssl_example.c
Created November 11, 2023 07:32 — forked from irbull/OpenSSLExample.cpp
Code signing and verification with OpenSSL
#include <assert.h>
#include <openssl/aes.h>
#include <openssl/bio.h>
#include <openssl/decoder.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/pem.h>
#include <openssl/rsa.h>
#include <openssl/ssl.h>
@errikos
errikos / install_adobe_fonts.sh
Last active February 19, 2019 10:41 — forked from enzinier/install_font_adobe_source_code_pro.sh
Install Adobe fonts (Source Code Pro, Source Sans Pro, Source Serif Pro) on Linux systems
#!/bin/sh
# Userland mode (~$USER/), (~/).
FONT_HOME=~/.local/share/fonts
echo "installing fonts to $FONT_HOME"
for type in code sans serif; do
mkdir -p "$FONT_HOME/adobe-fonts/source-$type-pro"
(git clone \
@errikos
errikos / decomp_example.cc
Created November 30, 2018 16:45
C++-17 Decomposition
#include <iostream>
#include <utility>
#include <vector>
std::pair<int, int> foo(int x, int y) {
return std::make_pair(x + 1, y + 10);
}
int main(void) {
auto [x, y] = foo(1, 5);
@errikos
errikos / fswatch-rsync
Created September 26, 2018 09:22 — forked from fernandomora/fswatch-rsync
Watch folder with fswatch and sync it with rsync
#!/usr/bin/env bash
# check color support
colors=$(tput colors)
if (($colors >= 8)); then
red='\033[0;31m'
nocolor='\033[00m'
else
red=
nocolor=
@errikos
errikos / Ubuntu_at_CERN.md
Last active July 25, 2018 13:46 — forked from ansantam/Ubuntu_at_CERN.md
How to setup your Ubuntu @CERN

CERN Hacks

This Gist is a guide on how to setup your computer at CERN with Ubuntu 18.04 LTS. Last tested by myself on a brand new computer on 25/07/2018.

How To Acces AFS

Step 1: install packages

@errikos
errikos / epflvpn
Last active February 26, 2018 20:11 — forked from alirezaomidi/openconnect.sh
Simple script to connect to / disconnect from the EPFL VPN using OpenConnect.
#!/usr/bin/env bash
PROG=$(basename $0)
SERVER="vpn.epfl.ch"
USER=<your_username_here>
function help {
echo "Usage: $PROG [-c] [-d]"
echo
echo "Options"
@errikos
errikos / csview
Created October 20, 2017 22:01
Command line CSV viewer using column and less
#!/usr/bin/env bash
function usage {
echo "Usage: csview <file>"
}
if (( $# != 1 )); then
usage
if (( $# < 1 )); then
echo "Too few arguments"
@errikos
errikos / compton.conf
Created April 13, 2017 15:22
Compton configuration file, based off http://duncanlock.net/blog/2013/06/07/how-to-switch-to-compton-for-beautiful-tear-free-compositing-in-xfce/ with fixed GTK3 client side decorations.
#################################
#
# Backend
#
#################################
# Backend to use: "xrender" or "glx".
# GLX backend is typically much faster but depends on a sane driver.
backend = "glx";