Skip to content

Instantly share code, notes, and snippets.

View Oyonax's full-sized avatar

Oyonax Oyonax

  • ሞንትሪያል
View GitHub Profile
@Oyonax
Oyonax / randomize-mac-addresses
Created January 30, 2018 19:21 — forked from fawkesley/randomize-mac-addresses.sh
In Ubuntu 16.04, randomize WiFi MAC addresses with a daily rotation - /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses
#!/bin/sh
# /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses
# Configure every saved WiFi connection in NetworkManager with a spoofed MAC
# address, seeded from the UUID of the connection and the date eg:
# 'c31bbcc4-d6ad-11e7-9a5a-e7e1491a7e20-2017-11-20'
# This makes your MAC impossible(?) to track across WiFi providers, and
# for one provider to track across days.
@Oyonax
Oyonax / switch-tty.sh
Created March 28, 2018 05:06 — forked from NeoCat/switch-tty.sh
Script to switch console attached to a command (for Linux)
#!/bin/bash
# For example: switch-tty.sh `pidof vi` `tty`
target=$1
dest=$2
if [ -z "$target" -o -z "$dest" ]; then
echo "usage: $0 pid target"
exit 1
fi
@Oyonax
Oyonax / get_latest_release.sh
Created June 11, 2018 12:35 — forked from lukechilds/get_latest_release.sh
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4
@Oyonax
Oyonax / ipv6-regex-test.sh
Created February 7, 2020 16:09 — forked from syzdek/ipv6-regex-test.sh
Simple script to test my IPv6 regular expression.
#!/bin/sh
#
# Use posixregex CLI tool from: https://github.com/syzdek/dmstools/blob/master/src/posixregex.c
RE_IPV4="((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])"
posixregex -r "^(${RE_IPV4})$" \
127.0.0.1 \
10.0.0.1 \
192.168.1.1 \
@Oyonax
Oyonax / gist:ba59ae566df01310597ade8606d361df
Created April 23, 2020 11:32 — forked from TomCan/gist:8c5976d62523b57ddeb13705af54c45d
Remove and re-add a user from MacOS FileVault full disk encryption
When a users' password has been changed on the Active Directory, you can use this procedure to remove the user from FileVault and re-add it with his new password.
sudo fdesetup remove -user username
sudo fdesetup add -usertoadd username
Enter the user name: adminusername
Enter the password for user 'adminusername':
Enter the password for the added user 'username':
Where username is the username of the user you want to remove and re-add.
And adminusername is the username of an administrative user.
If you're having problems connecting to a Dell iDrac remote console due to Java not trusting the certificate although it's in the exception list, try this.
The certificate is probably signed by a MD5 intermedia certificate, and that's disabled by default. To enable, this, you need to edit your java.security file.
On Windows, this is located at C:\Program Files (x86)\Java\jre_<version-here>\lib\security\java.security
You need to run your editor as Administrator to be able to modify the file.
Find the line that says:
# jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024
If the line starts with a #, remove the # to uncomment it.
@Oyonax
Oyonax / Windows 10 20H1.ps1
Created May 1, 2020 19:05
Test script Windows 10 20H1
<#
.SYNOPSIS
The PowerShell script is a set of tweaks for fine-tuning Windows 10 and automating the routine tasks.
.DESCRIPTION
Supported Windows versions:
Windows 10 19041 (2004/20H1) x64 only. Tested on Pro/Enterprise editions.
Check whether file is encoded in UTF-8 with BOM.
PowerShell must be run with elevated privileges;
Set PowerShell execution policy: Set-ExecutionPolicy -ExecutionPolicy Bypass -Force to be able to run .ps1 files.
@Oyonax
Oyonax / Windows10-Setup.ps1
Created May 8, 2020 18:08 — forked from NickCraver/Windows10-Setup.ps1
(In Progress) PowerShell Script I use to customize my machines in the same way for privacy, search, UI, etc.
##################
# Privacy Settings
##################
# Privacy: Let apps use my advertising ID: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1
# Privacy: SmartScreen Filter for Store Apps: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0
@Oyonax
Oyonax / apt-mirror.sh
Created September 25, 2020 11:07 — forked from se35710/apt-mirror.sh
Replace archive.ubuntu.com in sources.list with fastest mirror
sed -i 's/http:\/\/archive.ubuntu.com\/ubuntu\//mirror:\/\/mirrors.ubuntu.com\/mirrors.txt/g' /etc/apt/sources.list
@Oyonax
Oyonax / windows10activation
Created November 27, 2020 16:31
Activate Windows 10 without Any Activator
1. Open CMD as Administrator
2. Paste the following commands into the Cmd: One by one, follow the order.
cscript slmgr.vbs /ipk "SERIAL NUMBER HERE"
Replace SERIAL NUMBER HER with any of these, according your Windows 10 installation type.
Home/Core TX9XD-98N7V-6WMQ6-BX7FG-H8Q99
Home/Core (Country Specific) PVMJN-6DFY6-9CCP6-7BKTT-D3WVR
Home/Core (Single Language) 7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH