Skip to content

Instantly share code, notes, and snippets.

View PotatoMaster101's full-sized avatar
🏠
Working from home

PotatoMaster101

🏠
Working from home
View GitHub Profile
@PotatoMaster101
PotatoMaster101 / WeaponInfo.xml
Last active February 21, 2021 10:08
GTA4's WeaponInfo.xml, modified for more ammo
<!-- GTAIV/common/data/WeaponInfo.xml -->
<weaponinfo version="1">
<!-- -->
<!-- MELEE WEAPONS -->
<!-- -->
<weapon type="UNARMED">
<data slot="UNARMED" firetype="MELEE" damagetype="MELEE" group="PUNCH_KICK" targetrange="10.0" weaponrange="1.6">
@PotatoMaster101
PotatoMaster101 / vmware_fix.md
Last active October 11, 2023 06:08
Fixes VMWare error "Your host does not meet minimum requirements to run VMware workstation with hyper-v or device/credential guard enabled"

Windows 10 Home VMWare Fix

Error Message

Your host does not meet minimum requirements to run VMware workstation with hyper-v or device/credential guard enabled.

Fix Steps

  1. Go to Windows Security -> Device Security -> Core Isolation, make sure it is turned off
  2. Run CMD as admin, run command bcdedit /set hypervisorlaunchtype off
  3. Reboot PC
@PotatoMaster101
PotatoMaster101 / Test-ConsoleColours.ps1
Last active February 21, 2021 10:09
Tests all the PowerShell Core colours in the current console
<#
.SYNOPSIS
Tests all the PowerShell Core colours in the current console.
.DESCRIPTION
The Test-ConsoleColours.ps1 script prints out the standard colours of PowerShell Core onto the current console, useful for testing console colours.
.INPUTS
None.
You cannot pipe objects to Test-ConsoleColours.ps1.
@PotatoMaster101
PotatoMaster101 / single_file_app.md
Created January 8, 2021 04:42
Commands for compiling single-file app in .NET core

dotnet Compile Single File App

Windows

$ dotnet publish -r win-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true -p:PublishTrimmed=true -p:PublishReadyToRun=true

Linux

$ dotnet publish -r linux-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true -p:PublishTrimmed=true
@PotatoMaster101
PotatoMaster101 / dev_pwsh.md
Last active September 2, 2020 08:47
Steps to create a developer PowerShell Core shortcut

Developer PowerShell Core

Steps to create a developer PowerShell Core shortcut for developing programs using PowerShell Core instead of default PowerShell 5.

  1. Install PowerShell Core and Visual Studio
  2. Find Developer PowerShell for VS 2019 from start menu and show in folder (name might change for future versions of VS)
  3. Right click Developer PowerShell for VS 2019 and click Properties
  4. Copy the arguments in Target (for example, -noe -c "&{Import-Module """C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"""; Enter-VsDevShell c7bcda59}")
  5. Create a new shortcut for PowerShell Core
  6. Paste the arguments into the Target of the new shortcut
  7. Shortcut will launch developer PowerShell Core when opened
@PotatoMaster101
PotatoMaster101 / vmfix.sh
Last active February 21, 2021 10:09
Fixes VMWare after Linux kernel update
#!/bin/sh
####################################################################################################
# Fixes VMWare after Linux kernel update.
# https://askubuntu.com/questions/1096052/vmware-15-error-on-ubuntu-18-4-could-not-open-dev-vmmon-no-such-file-or-dire
#
# Usage: /bin/sh vmfix.sh
####################################################################################################
if [ "$(id -u)" -ne 0 ]; then
echo 'ERROR: Must be run as root' 1>&2
@PotatoMaster101
PotatoMaster101 / full_tty.md
Last active February 21, 2021 10:09
Steps to upgrade a reverse shell to a full TTY shell

Upgrade to Full TTY Shell

  1. Make sure shell is bash: python3 -c 'import pty;pty.spawn("/bin/bash")'
  2. Send reverse shell to background: CTRL + Z
  3. Change terminal setting: stty raw -echo
  4. Send reverse shell to foreground: fg
  5. Reset terminal: reset
  6. When prompt terminal type, use xterm
  7. (Optional) change terminal row and width, use stty rows 75 cols 250
@PotatoMaster101
PotatoMaster101 / upload.php
Last active February 21, 2021 10:09
I just want a quick and dirty PHP file upload
<!-- Simple PHP File Upload -->
<!-- Check directory permissions if doesn't work -->
<?php
if (is_uploaded_file($_FILES["fname"]["tmp_name"])) {
$fname = $_FILES["fname"]["name"];
move_uploaded_file($_FILES["fname"]["tmp_name"], $fname);
echo "File \"" . $fname . "\" uploaded. <br>";
}
@PotatoMaster101
PotatoMaster101 / hello.asm
Last active July 25, 2023 08:33
A simple hello world program written in assembly language, aimed for OS/X systems
; Prints "hello world" to the screen.
; OS/X requires system call arguments to be pushed onto the stack in reversed
; order, with an extra 4 bytes (DWORD) at the end.
;
; Build with:
; nasm -f macho hello.asm
; ld -o hello hello.o
;
; Run with:
; ./hello