Skip to content

Instantly share code, notes, and snippets.

View p3x-robot's full-sized avatar
🦝
LOL - opening the sources ...

patrikx3 p3x-robot

🦝
LOL - opening the sources ...
View GitHub Profile
@p3x-robot
p3x-robot / windows10-reduce-winsxs-folder-plus-delete-temporary-files.cmd
Last active October 3, 2022 15:22
🗑️ Windows 10 - reduce WinSxS folder and delete temporary files
REM you need to execute in adminstrator command prompt
REM based on
REM https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/clean-up-the-winsxs-folder
Dism.exe /online /Cleanup-Image /StartComponentCleanup
REM All existing service packs and updates cannot be uninstalled after this command is completed.
REM This will not block the uninstallation of future service packs or updates
Dism.exe /online /Cleanup-Image /SPSuperseded
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
@p3x-robot
p3x-robot / samba-private-named.conf.update
Last active April 25, 2018 21:38
Samba after 4.6 with domain server Bind / Named configuration changed ☠️
/* this file is auto-generated - do not edit */
/* Replace the * with a period (.) after ms-self. */
/* That field is just a placeholder and could be forgotten */
/* leading to the type list being wrongly interpreted. */
/* Named now requires it to be a period. */
/* Right after ms-self, now not *, but . */
update-policy {
grant CORY-DC.COMPANY.COM ms-self . A AAAA;
grant [email protected] wildcard * A AAAA SRV CNAME;
grant [email protected] wildcard * A AAAA SRV CNAME;
@p3x-robot
p3x-robot / windows-10-hdr-nvidia.txt
Created November 19, 2018 11:44
Make Nvidia enable HDR in Windows
Set display settings to HDR.
In NVIDIA control panel, set the settings to 4:2:2 x 10bit (maybe 8 is working - depends)
@p3x-robot
p3x-robot / openwrt-openvpn-generate-certificates-sequence.sh
Last active July 19, 2019 07:55
OpenWRT OpenVPN generate certificates sequence
easyrsa build-ca nopass
easyrsa gen-dh
easyrsa build-server-full named nopass
easyrsa build-client-full named-android
easyrsa build-client-full named-laptop
easyrsa build-client-full named-workstation
@p3x-robot
p3x-robot / debian-testing-build-msmtp-mta.sh
Last active January 3, 2019 21:53
Debian Testing / Buster / Bullseye MSMTP / MSMTP-MTA not working, here how to build it
# it will mirror the debian msmtp-mta, but works with TLS!!!
# based on
# https://gitlab.marlam.de/marlam/msmtp/issues/24
sudo -i
cd /root
git clone https://gitlab.marlam.de/marlam/msmtp.git
cd msmtp
git checkout tags/msmtp-1.8.1
# i removed the msmtp msmtp-mta, because it replaces
@p3x-robot
p3x-robot / domain.com.conf
Last active January 6, 2019 14:45
JOOMLA always enable HTTPS on NGINX HTTP Reverse Proxy
# in the proxy part, add in this:
proxy_set_header X-Forwarded-Proto https;
@p3x-robot
p3x-robot / linux-get-ipv6-address.sh
Created January 19, 2020 07:24
Linux IPv6 addresses
sudo ip addr show dev enp1s0f2 | sed -e's/^.*inet6 \([^ ]*\)\/.*$/\1/;t;d'
@p3x-robot
p3x-robot / move-the-mouse-disable-screensaver.sh
Last active September 27, 2021 11:44
Move mouse to prevent screensaver from activating locking
#!/bin/bash
# you need to install xdotool:
# sudo apt install -y xdotool
# probably you can find this in every distro, but it only shows the debian based distros install
move=(-1 1 0)
wait=60
while :
@p3x-robot
p3x-robot / debian-based-linux-delete-old-kernels-help.txt
Last active February 11, 2022 18:14
Debian based Linux delete old kernels help
dpkg --list | egrep -i --color 'linux-image|linux-headers|linux-modules'
dpkg --list | egrep -i --color 'linux-image|linux-headers|linux-modules' | grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge