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 / ntfs-file-system-increase-speed-performance.com
Last active March 6, 2024 17:38
🚄 This is a simple utility to increase the NTFS performance by turning off some NTFS features that are not so used by now (or not so important).
rem execute as an Administrator
rem based on http://www.windowsdevcenter.com/pub/a/windows/2005/02/08/NTFS_Hacks.html
ram based on https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-2000-server/cc938961(v=technet.10)
rem http://archive.oreilly.com/cs/user/view/cs_msg/95219 (some installers need 8dot3 filenames)
rem disable 8dot3 filenames
ram Warning: Some applications such as incremental backup utilities rely on this update information and do not function correctly without it.
fsutil behavior set disable8dot3 1
@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 / 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
@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 / extract-clonzilla.sh
Last active March 1, 2021 18:09
🖴 clonezilla restore files from image
#!/usr/bin/env bash
# http://blog.christosoft.de/2012/05/mount-clonezilla-image-to-restore-single-file-browse/
# ./extract-clonzilla /media/patrikx3/SEAGATE-450GB/restore/image.img '/media/patrikx3/SEAGATE-450GB/backup/2017-05-21-17-img/sda1.ext4-ptcl-img.gz.*'
# $1 = destination - full path eg /media/clonzilla/image.img
# $2 = source = '/media/backup/date/sda1.ext4-ptcl-img.gz.*' (import ' in the file, since * is needed!)
echo DESTINATION: $1
echo SOURCE: $2
@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 / grub.cfg
Created March 31, 2018 12:56 — forked from Pysis868/grub.cfg
My own configuration file for GRUB2 to boot various live distributions of Linux-based operating systems, along with some system tools. I tried to include a lot of sample configuration entries, even if I don't currently use them, so it may help others. Exceedingly long blog post: http://tehfishyblog.logdown.com/chips/306146-a-homemade-ultimate-bo…
# Config for GNU GRand Unified Bootloader (GRUB) (2)
# /boot/grub/grub.cfg
# or
# /boot/grub2/grub.cfg
# This grub.cfg file was created by Lance http://www.pendrivelinux.com
# Suggested Entries and the suggestor, if available, will also be noted.
# and then improved by Pysis.
@p3x-robot
p3x-robot / linux-cpu-temperature-speed.sh
Last active October 8, 2019 02:10
🌡️LINUX, it shows your temperature and the CPU speed (I use Debian and Ubuntu).
#!/bin/bash
# Debian
# sudo apt install lm-sensors bc linux-cpupower
# Ubuntu
# probably is https://packages.ubuntu.com/search?suite=xenial&section=all&arch=any&keywords=cpupower&searchon=contents
# but you might to have a specific kernel linux-tools-common
# sudo apt install lm-sensors bc linux-tools-common
# Then you go this:
@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 / hack-remove-decorators.js
Last active February 25, 2019 11:02
⛮ How to disable the remove Angular decorators @ngtools/webpack mess
const fs = require('fs');
const cwd = process.cwd();
const hackPath = `${cwd}/node_modules/@ngtools/webpack/src`
const hackFileName = `${hackPath}/angular_compiler_plugin.js`
const hackFileNameHacked = `${hackFileName}.hacked`
const log = '@ngtool/webpack angular decorators remove'
const hack = () => {
if (!fs.existsSync(hackFileNameHacked)) {
const problemCode = fs.readFileSync(hackFileName).toString('utf-8').split('\n');