Skip to content

Instantly share code, notes, and snippets.

View arag0re's full-sized avatar
🍫
i may be slow to respond

arag0re.eth arag0re

🍫
i may be slow to respond
View GitHub Profile
@arag0re
arag0re / Keycodes.swift
Created October 17, 2022 20:12 — forked from swillits/Keycodes.swift
Swift Keyboard Keycodes
struct Keycode {
// Layout-independent Keys
// eg.These key codes are always the same key on all layouts.
static let returnKey : UInt16 = 0x24
static let enter : UInt16 = 0x4C
static let tab : UInt16 = 0x30
static let space : UInt16 = 0x31
static let delete : UInt16 = 0x33
static let escape : UInt16 = 0x35
@arag0re
arag0re / osx_extract_hash.py
Created July 3, 2022 21:22 — forked from teddziuba/osx_extract_hash.py
Extract a Mac OSX Catalina user's password hash as a hashcat-compatible string
#!/usr/bin/env python3
"""
Mac OSX Catalina User Password Hash Extractor
Extracts a user's password hash as a hashcat-compatible string.
Mac OSX Catalina (10.15) uses a salted SHA-512 PBKDF2 for storing user passwords
(hashcat type 7100), and it's saved in an annoying binary-plist-nested-inside-xml-plist
format, so previously reported methods for extracting the hash don't work.
@arag0re
arag0re / Dockerfile
Last active June 21, 2022 14:22
Ubuntu 22.04 Docker Freeradius
FROM ubuntu:22.04
LABEL Maintainer=arag0re.eth
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update
RUN apt-get install -y ssh zsh curl wget git libssl-dev ca-certificates sudo build-essential systemd dbus dbus-user-session python3 openssh-server openssh-client
RUN apt-get install -y python-is-python3 neofetch libnet-ssleay-perl libcrypt-ssleay-perl freeradius freeradius-utils eapoltest
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
RUN git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
RUN sed 's,plugins=(git)[^;]*,plugins=(git zsh-autosuggestions),' -i /root/.zshrc
RUN source /root/.zshrc | bash
@arag0re
arag0re / restart-ssh.sh
Created April 19, 2022 15:52
Restart SSH on Mac Terminal (High Sierra Method and Latest Method)
# high sierra
sudo launchctl stop com.openssh.sshd
sudo launchctl start com.openssh.sshd
# latest
sudo vim /etc/services # (update the port config for ssh and save)
sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist
@arag0re
arag0re / macOS-Dock-AutoHideAndRevealSpeed.md
Last active April 18, 2022 02:08
macOS Dock AutoHideAndRevealSpeed

On macOS Mojave and above

defaults write com.apple.Dock autohide-delay -float 0.0001; killall Dock

on a version prior to macOS Mojave

defaults write com.apple.Dock autohide-delay -float 0; killall Dock

To undo this behavior:

@arag0re
arag0re / Node_portable.md
Last active April 7, 2022 13:22
node and npm portable
  1. Get node binary (node.exe) from https://nodejs.org/download/release/ then select your preferred version and download node.exe on win or the tar.gz archive for your unix platform (darwin--.tar.gz or linux--.tar.gz)
  2. Create the folder where node will reside and move node.exe to it or on unix copy the extracted tar file to it
  3. Download the last zip version of npm from http://nodejs.org/dist/npm
  4. Unpack the zip inside the node folder
  5. Download the last tgz version of npm from http://nodejs.org/dist/npm
  6. Open the tgz file and unpack only the file bin/npm (without extension) directly on the node folder.
  7. Add the the node folder and the packages/bin folder to PATH
  8. On a command prompt execute npm install -g npm to update npm to the latest version

Now you can use npm and node from windows cmd or from bash shell like Git Bash of msysgit.

@arag0re
arag0re / install.ps1
Last active March 10, 2022 22:48
Standart Install with Chocolatey
## You need to start Powershell as Admin for this!!!
### WARNING: First you have to set the execution policy for powershell scripts on this system to "Set-ExecutionPolicy unrestricted"
### after executing this script change it back to "Set-ExecutionPolicy allSigned" (may have to restart powershell for this)
$Packages = 'googlechrome',
"firefox",
"notepadplusplus",
"7zip",
"openjdk8",
"openjdk11",
"office-tool",
@arag0re
arag0re / Microsoft.PowerShell_profile.ps1
Created January 2, 2022 19:45
Microsoft.PowerShell_profile.ps1
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost') {
Import-Module PSReadLine
}
Import-Module -Name Terminal-Icons
@arag0re
arag0re / create_win_usb
Created December 20, 2021 10:01
create windows bootable usb on macOS
diskutil eraseDisk MS-DOS "WIN10" GPT /dev/disk2
hdiutil mount ~/Desktop/Win10_2004_EnglishInternational_x64.iso
rsync -vha --exclude=sources/install.wim /Volumes/CCCOMA_X64FRE_EN-GB_DV9/* /Volumes/WIN10
install homebrew if not already installed by executing: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install wimlib
mkdir /Volumes/WIN10/sources
wimlib-imagex split /Volumes/CCCOMA_X64FRE_EN-GB_DV9/sources/install.wim /Volumes/WIN10/sources/install.swm 3800
@arag0re
arag0re / create_manjaro_usb
Last active December 20, 2021 10:03
create manjaro usb with diskutil and dd on mac
diskutil eraseDisk "Free Space" disk /dev/disk2
sudo dd if=~/Downloads/manjaro-kde-21.1.3-minimal-210916-linux513.iso of=/dev/disk2 bs=4096