Skip to content

Instantly share code, notes, and snippets.

@radupotop
radupotop / 20-intel.conf
Created January 24, 2014 13:21
/etc/X11/xorg.conf.d/20-intel.conf
# /etc/X11/xorg.conf.d/20-intel.conf
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "AccelMethod" "uxa"
Option "TearFree" "true"
EndSection
@radupotop
radupotop / Sequence diagram
Created May 5, 2022 14:25
Mermaid Sequence diagram
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts <br/>prevail!
John-->>Alice: Great!
John->>Bob: How about you?
@radupotop
radupotop / .pylintrc
Created April 29, 2022 08:29
pylintrc
[MESSAGES CONTROL]
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time.
#enable=
# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
@radupotop
radupotop / nginx.conf
Created March 14, 2022 01:08
Nginx default Dummy server
# Nginx default Dummy server
server {
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
ssl_reject_handshake on;
return 444;
}
@radupotop
radupotop / iperf-lan-vs-wg.txt
Created March 9, 2022 10:04
iperf results LAN vs WG
iperf3 -c ham.lan -R
Connecting to host ham.lan, port 5201
Reverse mode, remote host ham.lan is sending
[ 5] local 192.168.1.44 port 36732 connected to 192.168.1.3 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 110 MBytes 925 Mbits/sec
[ 5] 1.00-2.00 sec 110 MBytes 921 Mbits/sec
[ 5] 2.00-3.00 sec 111 MBytes 928 Mbits/sec
[ 5] 3.00-4.00 sec 110 MBytes 924 Mbits/sec
@radupotop
radupotop / wireguard.conf
Created March 3, 2022 23:08 — forked from nealfennimore/wireguard.conf
Wireguard VPN - Forward all traffic to server
# ------------------------------------------------
# Config files are located in /etc/wireguard/wg0
# ------------------------------------------------
# ---------- Server Config ----------
[Interface]
Address = 10.10.0.1/24 # IPV4 CIDR
Address = fd86:ea04:1111::1/64 # IPV6 CIDR
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # Add forwarding when VPN is started
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE # Remove forwarding when VPN is shutdown
@radupotop
radupotop / stubby.xml
Created February 18, 2022 10:24 — forked from alanbuxey/stubby.xml
Cloudflare Stubby config
#
# This is a yaml version of the stubby configuration file (it replaces the
# json based stubby.conf file used in earlier versions of getdns/stubby).
#
# For more information see
# https://dnsprivacy.org/wiki/display/DP/Configuring+Stubby
#
# This format does not fully support all yaml features - the restrictions are:
# - the outer-most data structure must be a yaml mapping
# - mapping keys must be yaml scalars
@radupotop
radupotop / build-blog.yml
Last active February 6, 2022 18:50
.github/workflows/build-blog.yml
# .github/workflows/build-blog.yml
#
name: Build & Publish blog
on:
push:
branches: [ master ]
jobs:
build-blog:
@radupotop
radupotop / lsusb-1532-0543.txt
Created November 21, 2021 19:33
lsusb -v -d 1532:0543
Bus 001 Device 004: ID 1532:0543 Razer USA, Ltd Razer Seiren V2 X
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 16
idVendor 0x1532 Razer USA, Ltd
@radupotop
radupotop / VersionedMixinModel.py
Last active October 26, 2021 14:04
Django versioned mixin model
class VersionedMixin(Model):
"""
When the model is updated keep the old record intact and create a new one.
"""
parent_revision = ForeignKey('self', on_delete=CASCADE, null=True, blank=True, related_name='+')
child_revision = ForeignKey('self', on_delete=CASCADE, null=True, blank=True, related_name='+')
class Meta:
abstract = True