Skip to content

Instantly share code, notes, and snippets.

View unixfox's full-sized avatar

Émilien (perso) unixfox

View GitHub Profile
@gregorycollins
gregorycollins / 00-hacking-tilix-smaller-chrome.md
Last active November 16, 2023 12:55
How to hack your tilix to make tab/window chrome smaller

How to hack your Tilix to make tab/window chrome smaller

I really like the Tilix terminal emulator, but I hate how much space the default chrome takes up:

before

Those tabs are enormous! But did you know that this is user-configurable? GTK3 widgets are styled using CSS, and you can override the rules in ~/.config/gtk-3.0/gtk.css. Add the following rules to this file:

@nicman23
nicman23 / upgrade
Created April 21, 2018 06:34
Openwrt upgrade script
#!/bin/sh /etc/rc.common
START=99
USE_PROCD=1
start_service() {
if [ -e /root/.upgrade ]
then exit
else touch /root/.upgrade
fi
@fox-srt
fox-srt / mitm6.rules
Created January 26, 2018 17:06
MITM6 IDS Signatures
# Snort & Suricata signatures for:
# https://blog.fox-it.com/2018/01/11/mitm6-compromising-ipv4-networks-via-ipv6
alert udp fe80::/12 [546,547] -> fe80::/12 [546,547] (msg:"FOX-SRT - Policy - DHCPv6 advertise"; content:"|02|"; offset:48; depth:1; reference:url,blog.fox-it.com/2018/01/11/mitm6-compromising-ipv4-networks-via-ipv6/; threshold:type limit, track by_src, count 1, seconds 3600; classtype:policy-violation; sid:21002327; rev:2;)
alert udp ::/0 53 -> any any (msg:"FOX-SRT - Suspicious - WPAD DNS reponse over IPv6"; byte_test:1,&,0x7F,2; byte_test:2,>,0,6; content:"|00 04|wpad"; nocase; fast_pattern; threshold: type limit, track by_src, count 1, seconds 1800; reference:url,blog.fox-it.com/2018/01/11/mitm6-compromising-ipv4-networks-via-ipv6/; classtype:attempted-admin; priority:1; sid:21002330; rev:1;)
@atinux
atinux / async-foreach.js
Last active April 2, 2025 11:34
JavaScript: async/await with forEach()
const waitFor = (ms) => new Promise(r => setTimeout(r, ms))
const asyncForEach = async (array, callback) => {
for (let index = 0; index < array.length; index++) {
await callback(array[index], index, array)
}
}
const start = async () => {
await asyncForEach([1, 2, 3], async (num) => {
await waitFor(50)
@0x63lv
0x63lv / hex_to_str.py
Last active August 14, 2019 16:48 — forked from vigneshwaranr/migrator.sh
Script to convert Grafana SQLite dumps into PostgreSQL compatible dumps, and import it into PostgreSQL
#!/bin/env python
import fileinput
import re
import binascii
for line in fileinput.input(inplace = 1):
if re.search('X\'([a-fA-F0-9]+)\'', line) is not None:
unhexed_string = binascii.unhexlify(re.search('X\'([a-fA-F0-9]+)\'', line).group(1))
unhexed_string = unhexed_string.replace("'", "''")
@brianclemens
brianclemens / sudoers.lecture
Created July 8, 2017 04:04
hardcore sudo lecture
 "Bee" careful __
with sudo! // \
\\_/ //
''-.._.-''-.._.. -(||)(')
'''
@denisu
denisu / fastly.txt
Created June 18, 2017 21:08
Fastly IPv6 Hosts
2a04:4e42::1 5742636757417984-fe1.pantheonsite.io
2a04:4e42::2 5724160613416960-fe2.pantheonsite.io
2a04:4e42::3 5746821397741568-fe3.pantheonsite.io
2a04:4e42::4 5714315743068160-fe4.pantheonsite.io
2a04:4e42::72 *.avvosites.com
2a04:4e42::74 www.aclu.org
2a04:4e42::78 *.twimg.com
2a04:4e42::79 *.wixstatic.com
2a04:4e42::80 admin.wes.bibbed.org
2a04:4e42::81 www.bbc.com
<#
.Synopsis
Scans a host or network for the MS17-010 vulnerability and output results as a
table that you can pipe to other PowerShell functions such as Invoke-Command or
Export-CSV.
.DESCRIPTION
This script will use a custom NMap NSE script to scan a destination host on
port 445 for the MS17-010 vulnerability. If the host is not online or is blocking
@mdonkers
mdonkers / server.py
Last active June 14, 2025 20:50
Simple Python 3 HTTP server for logging all GET and POST requests
#!/usr/bin/env python3
"""
License: MIT License
Copyright (c) 2023 Miel Donkers
Very simple HTTP server in python for logging requests
Usage::
./server.py [<port>]
"""
from http.server import BaseHTTPRequestHandler, HTTPServer
@g105b
g105b / key-sync.sh
Created January 27, 2017 15:09
Sync authorized_keys with Github public keys
#!/bin/bash
GITHUB_USERNAME=#PUT_YOUR_USERNAME_HERE
TMP=/tmp/existing_cron
crontab -l > $TMP
echo "*/10 * * * * /usr/bin/wget https://github.com/$GITHUB_USERNAME.keys -O ~/.ssh/authorized_keys" >> $TMP
crontab $TMP
rm $TMP