Skip to content

Instantly share code, notes, and snippets.

View n0toose's full-sized avatar
👾
Have you considered how all these social features distract from working on code?

Panagiotis "Ivory" Vasilopoulos n0toose

👾
Have you considered how all these social features distract from working on code?
  • Aachen, Germany
View GitHub Profile
@n0toose
n0toose / PKGBUILD
Created March 21, 2020 08:53
Monolithic Wireguard PKGBUILD that I used for Arch Linux ARM (for the Raspberry Pi 4, which doesn't have a 5.6-based kernel right now)
# based on https://github.com/graysky's PKGBUILD
# https://archlinuxarm.org/forum/viewtopic.php?f=15&t=13957
pkgbase=wireguard
pkgname=(wireguard-module wireguard-tools)
pkgver=0.0.20191219
pkgrel=1
_pkgname=WireGuard
pkgdesc='next generation secure network tunnel'
arch=('x86_64' 'aarch64' 'armv7h')
url='http://www.wireguard.com/'
@n0toose
n0toose / dnsmasq.conf
Last active April 2, 2020 08:41
Custom dnsmasq configuration (dn42, quad9, opennic support)
no-resolv
filterwin2k
# dn42
server=/dn42/172.20.0.53
server=/ffch/172.20.0.53
server=/20.172.in-addr.arpa/172.20.0.53
server=/21.172.in-addr.arpa/172.20.0.53
server=/22.172.in-addr.arpa/172.20.0.53
server=/23.172.in-addr.arpa/172.20.0.53
@n0toose
n0toose / c_cpp_properties.json
Last active July 8, 2020 13:11
3DS devkitPro configuration for Visual Studio Code (vscode). Place this file inside of your .vscode folder (or the corresponding configuration directory, depending on your operating system)
{
"configurations": [
{
"name": "3DS",
"includePath": [
"${workspaceFolder}/**",
"/opt/devkitpro/devkitARM/arm-none-eabi/include",
"/opt/devkitpro/libctru/include"
],
"defines": [],
@n0toose
n0toose / fix-dn42-ca.sh
Created July 27, 2020 12:46
Import dn42 certificate authority (p11-kit)
wget https://ca.dn42.us/crt/root-ca.crt
sudo trust anchor --store root-ca.crt
@n0toose
n0toose / command.sh
Last active August 22, 2020 09:30
Remove Google apps from your phone without root
# Feel free to replace 'Google' with the name of another vendor.
for app in `(pm list packages | grep 'google' | grep -v 'com.google.android.packageinstaller' | sed s/package://)`; do pm uninstall -k --user 0 $app ; done
@n0toose
n0toose / blink.sh
Created August 28, 2020 00:01
Blink LED light in Linux randomly
@n0toose
n0toose / blink-all.sh
Created August 28, 2020 00:27
Blink all of the LED lights in your Linux workstation randomly.
@n0toose
n0toose / public_ipv6.sh
Created September 20, 2020 07:34
Show public IPv6 address
ip addr show dev eth0 | sed -e's/^.*inet6 \([^ ]*\)\/.*$/\1/;t;d' | grep -v "fe80"
@n0toose
n0toose / acme_dn42.sh
Created October 11, 2020 06:42
Small script for installing the acme.dn42 certificate
wget http://acme.dn42/dn42acme.pem
sudo cp dn42acme.pem /etc/ssl/certs
sudo openssl x509 -noout -hash -in dn42acme.pem
@n0toose
n0toose / leap.py
Created November 1, 2020 07:17
Leap seconds in Python
# source: https://stackoverflow.com/questions/39686553/what-does-python-return-on-the-leap-second
import time
import datetime as dt
time.mktime(time.strptime('2016-06-30T23:59:59', "%Y-%m-%dT%H:%M:%S"))
time.mktime(time.strptime('2016-06-30T23:59:60', "%Y-%m-%dT%H:%M:%S"))
# datetime will fail
dt.datetime.strptime('2016-06-30T23:59:60', "%Y-%m-%dT%H:%M:%S")