Skip to content

Instantly share code, notes, and snippets.

View Oyonax's full-sized avatar

Oyonax Oyonax

  • ሞንትሪያል
View GitHub Profile
@Oyonax
Oyonax / vagrant-cheat-sheet.md
Created March 28, 2021 20:53 — forked from wpscholar/vagrant-cheat-sheet.md
Vagrant Cheat Sheet

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
@Oyonax
Oyonax / Vagrantfile
Created March 20, 2021 04:29 — forked from gavincampbell/Vagrantfile
Vagrantfile for SQL Server on Linux with WideWorldImporters sample database and tSQLt framework included
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.network "forwarded_port", guest:1433, host:1433
config.vm.provider :libvirt do |libvirt|
libvirt.memory = "4096"
end
config.vm.provision "shell",
inline: <<-SHELL
@Oyonax
Oyonax / Win10Activation.txt
Created November 27, 2020 16:35 — forked from Dhanvesh/Win10Activation.txt
Windows 10 Activation Batch File
@echo off
title Windows 10 ALL version activator&cls&echo ************************************&echo Supported products:&echo - Windows 10 Home&echo - Windows 10 Professional&echo - Windows 10 Enterprise, Enterprise LTSB&echo - Windows 10 Education&echo.&echo.&echo ************************************ &echo Windows 10 activation...
cscript //nologo c:\windows\system32\slmgr.vbs /ipk TX9XD-98N7V-6WMQ6-BX7FG-H8Q99 >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk 3KHY7-WNT83-DGQKR-F7HPR-844BM >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk 7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk PVMJN-6DFY6-9CCP6-7BKTT-D3WVR >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk MH37W-N47XK-V7XM9-C7227-GCQG9 >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk NW6C2-QMPVW-D7KKK-3GKT6-VCFB2 >nul
@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
@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 / 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 / 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.
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 / 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.
@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 \