Skip to content

Instantly share code, notes, and snippets.

View prppedro's full-sized avatar
This cluster is currently *Error*

Tadeu R. P. prppedro

This cluster is currently *Error*
View GitHub Profile
@Miliox
Miliox / Makefile
Created November 8, 2012 00:36
Makefile to compile pdflatex with bibtex
# Author: Emiliano Carlos de Moraes Firmino @ 10/2012
SHELL=/bin/sh
THESIS=thesis
.SUFFIXES:
.SUFFIXES: .bib .pdf .tex
.PHONY: clean
run: $(THESIS).pdf
@yyuu
yyuu / snakeoil.sh
Created December 19, 2012 07:23
Generate snakeoil SSL certificates on Debian
sudo apt-get install ssl-cert
sudo make-ssl-cert generate-default-snakeoil
sudo usermod --append --groups ssl-cert yyuu
ls -l /etc/ssl/certs/ssl-cert-snakeoil.pem /etc/ssl/private/ssl-cert-snakeoil.key
@tomasinouk
tomasinouk / snat_dnat_advantech.md
Last active June 30, 2024 19:54
examples of SNAT, DNAT with iptables for Advantech, Conel routers, with comments (probably will work on other routers where iptables can be manipulated, care needs to be taken on applying these commands after reboot).

Some examples of SNAT, DNAT with iptables with comments

mainly used in start-up script

How to test 'safely'

When we play with iptables aka firewall we might end up in situation, where we execute rule, which has unforseen impact - lock yourself out. Recovering from this situation is necessity.

How to:

  • Enable reboot via SMS.
  • Test all commands in shell first before putting them into Start-up script. This way the command will be wiped out, when unit is rebooted.

masquarade all outgoing packets to be WLAN0 IP

@mvollrath
mvollrath / get-edid.py
Last active February 18, 2023 16:49
Write monitor EDID to stdout with xrandr
#!/usr/bin/env python
import re
import subprocess
def get_edid_for_output(connector: str) -> bytes:
xrandr = subprocess.run(
['xrandr', '--props'],
check=True,
@kvaps
kvaps / rspamd-lists.md
Last active May 6, 2024 05:13
Howto create local whitelists and blacklists for Rspamd

Local whitelists and blacklists for Rspamd

  • cd /etc/rspamd
  • create rspamd.conf.local
  • create lists:
touch local_bl_from.map.inc local_bl_ip.map.inc local_bl_rcpt.map.inc \
local_wl_from.map.inc local_wl_ip.map.inc local_wl_rcpt.map.inc
  • change permissions:
# <target name> <source device> <key file> <options>
xps_system /dev/disk/by-partlabel/xps_system none luks,discard