Skip to content

Instantly share code, notes, and snippets.

View soyfrien's full-sized avatar

Louis Waweru soyfrien

View GitHub Profile
@soyfrien
soyfrien / keybase.md
Last active December 9, 2020 05:15
keybase proof

Keybase proof

I hereby claim:

  • I am soyfrien on github.
  • I am 1of1 (https://keybase.io/1of1) on keybase.
  • I have a public key ASBOx79Auq8N1Pl7BtWu-S7ZM0gcUSimDnKLJEd4jE-FSgo

To claim this, I am signing this object:

@soyfrien
soyfrien / gist:a86b00f0dad22974d118b6951730ca58
Created June 13, 2017 18:33
rename integer named folders to maestro[n]
$topcon_controlsPath = "FULL_PATH"
$i = 1;
$dirs = Get-ChildItem -Directory $topcon_controlsPath | Select-Object -ExpandProperty Name | ForEach-Object { [Int]$_ } | Sort-Object
foreach ($d in $dirs)
{
$currentPathName = $topcon_controlsPath + "\" + $d
$newPathName = $topcon_controlsPath + "\Maestro" + $i
#Read-Host -Prompt "Press Enter to rename $currentPathName to $newPathName"
choco feature enable -n=allowGlobalConfirmation
cinst googlechrome
cinst 7zip
cinst sublimetext3
cinst github
cinst sysinternals
cinst putty
cinst cgwyn
cinst curl
@soyfrien
soyfrien / spss23act.sh
Created August 4, 2017 13:45
get around the "Administrator Privilege Error" activation issue
sudo /Applications/IBM/SPSS/Statistics/23/SPSS\ Statistics\ License\ Authorization\ Wizard.app/Contents/MacOS/SPSS\ Statistics\ License\ Authorization\ Wizard
# minimum size of USB stick 5.29GB
# Set here the path of your ISO file
$iso = 'C:\Users\localuser\Downloads\en_windows_server_2016_x64_dvd_9327751.iso'
# Clean ! will clear any plugged-in USB stick!!
Get-Disk | Where BusType -eq 'USB' |
Clear-Disk -RemoveData -Confirm:$true -PassThru
# Convert GPT
@soyfrien
soyfrien / rcheck.sh
Last active January 2, 2022 18:52
rcheck.sh: Answers question: restart required?
#!/bin/bash
if [ -f /var/run/reboot-required ]; then
echo '*** System restart required ***'
else echo 'Reboot not necessary.'
fi
@soyfrien
soyfrien / vimrc
Last active October 21, 2018 14:54
filetype plugin indent on
set tabstop=8 softtabstop=4 expandtab shiftwidth=4 smarttab
choco feature enable -n=allowGlobalConfirmation
cinst googlechrome 7zip sublimetext3 libreoffice authy-desktop
cinst putty cgwyn curl wget cyberduck filezilla winscp
cinst steam origin utorrent mpc-hc
cinst sysinternals procexp gpu-z cpu-z coretemp partitionmaster
cinst wireshark fiddler postman
cinst virtualmachineconverter vmwarevsphereclient

Gist of How Domain Was Joined

Install software

I installed Samba during the initital server installtion's tasksel-like dialog.

apt install ntp ntpdate winbind libnss-winbind libpam-winbind krb5-config krb5-locales krb5-user

Sync Time with DCs

vim /etc/ntp.conf

Set pool = ada.example.com

#/bin/bash
systemctl stop smbd.service winbind.service nmbd.service
net cache flush
rm -rf /var/lib/samba/*.tdb
rm -rf /var/lib/samba/group_mapping.ldb
systemctl start smbd.service winbind.service nmbd.service