Skip to content

Instantly share code, notes, and snippets.

View madduci's full-sized avatar

Michele Adduci madduci

View GitHub Profile
@madduci
madduci / script.sh
Created January 4, 2022 09:46
Arch/GnomeShell WireGuard integration
#!/usr/bin/env bash
# Prepare needed packages
sudo pacman -S base-devel wireguard-tools intltool libnma libsecret
git clone https://github.com/max-moser/network-manager-wireguard
cd network-manager-wireguard
# Configure the Project
./autogen.sh --without-libnm-glib
@madduci
madduci / sysctl.conf
Created February 10, 2020 15:22
Linux kernel hardening: Kernel parameters with sysctl
###
### SYSTEM SECURITY ###
### Inspired from https://www.kmotoko.com/articles/linux-hardening-kernel-parameters-with-sysctl/
###
# Enable address Space Randomization
kernel.randomize_va_space = 2
# Restrict core dumps
fs.suid_dumpable = 0
@madduci
madduci / ftth_openwrt.md
Last active March 17, 2024 08:12
Deutsche Telekom FTTH Access with OpenWRT

Configuring Deutsche Telekom FTTH Access with OpenWRT

After looking for alternatves to the suggested Router from Telekom (AVM FritzBox and HUawei Speedport), I've discovered the possibility of configuring my existing OpenWRT Router to act as gateway to the Telekom FTTH (Fiber To The Home) Magenta Zuhause package.

TL;DR

The WAN interface must be configured as follows (see your Telekom letter):

  • Protocol: PPPoE
  • PAP/CHAP username:
@madduci
madduci / sorting.sh
Last active September 17, 2019 20:20
Sorting files in folders
#!/bin/bash
readonly INPUT_FOLDER="${1}"
cd ${INPUT_FOLDER}
find . -type f -print0 | while read -d $'\0' file
do
information=$(ls -lt --time-style=+%b-%Y "${file}")
filedate=$(echo "${information}" | awk '{print $6}')
filename=$(echo "${information}" | awk '{print $7}' )
@madduci
madduci / tutorial.md
Created July 17, 2018 10:00 — forked from swalkinshaw/tutorial.md
Designing a GraphQL API

Tutorial: Designing a GraphQL API

This tutorial was created by Shopify for internal purposes. We've created a public version of it since we think it's useful to anyone creating a GraphQL API.

It's based on lessons learned from creating and evolving production schemas at Shopify over almost 3 years. The tutorial has evolved and will continue to change in the future so nothing is set in stone.

@madduci
madduci / custom_launcher
Last active January 22, 2020 18:10
bumblebee optirun steam launcher
# For NVidia/Bumblebee
LD_PRELOAD="libpthread.so.0 libGL.so.1" __GL_THREADED_OPTIMIZATIONS=1 optirun %command%
# For AMD/Vega
LD_PRELOAD=/usr/lib32/libopenal.so.1 %command%
@madduci
madduci / sign.sh
Created April 18, 2018 08:46 — forked from ezimuel/sign.sh
Sign and verify a file using OpenSSL command line tool. It exports the digital signature in Base64 format.
#!/bin/bash
# Sign a file with a private key using OpenSSL
# Encode the signature in Base64 format
#
# Usage: sign <file> <private_key>
#
# NOTE: to generate a public/private key use the following commands:
#
# openssl genrsa -aes128 -passout pass:<passphrase> -out private.pem 2048
# openssl rsa -in private.pem -passin pass:<passphrase> -pubout -out public.pem
@madduci
madduci / introrx.md
Created February 2, 2018 11:58 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@madduci
madduci / packages.ps1
Created December 13, 2017 14:55
Common used packages for Windows
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install -y flashplayerplugin firefox 7zip.install vlc notepadplusplus.install paint.net malwarebytes teamviewer foxitreader
@madduci
madduci / usc_parser.py
Created October 21, 2017 13:04
Conversion of Ground Truth data for the USC dataset
import sys
import glob
import os
import argparse
import xml.etree.ElementTree
# dlib output format: <image file='*.jpg'><box top='' left='' width='' height=''/> </image>
# USC format: <Object><Rect x="142" y="22" width="28" height="73"/></Object>