Skip to content

Instantly share code, notes, and snippets.

View BadgerCode's full-sized avatar
🦡

Michael Hawkins BadgerCode

🦡
View GitHub Profile
@BadgerCode
BadgerCode / infinite_craft_badger.md
Last active February 29, 2024 18:30
Infinite craft badger

Route to badger

  • Blockchain + honeycomb -> Honey Badger
  • Route: Fire + Steam + Cloud + Plague
    • Honey badger + Fire -> Fire Badger
    • Fire badger + Steam -> Steam Badger
    • Steam badger + Cloud -> Cloud Badger
    • Cloud Badger + plague -> Badger
  • Route: Fire + death + water
  • Honey badger + Fire -> Fire Badger
@BadgerCode
BadgerCode / git-config-user-for-remote.md
Last active February 6, 2024 14:35
Use different emails for different git repositories

Edit ~/.gitconfig

[user]
        email = [email protected]
        name = Michael Hawkins
[includeIf "hasconfig:remote.*.url:[email protected]:YOUR_COMPANY_NAME/**"]
        path = ~/Documents/Projects/Work/.gitconfig
@BadgerCode
BadgerCode / account-sharing.lua
Last active August 6, 2024 20:35
Checks if a user is using a family-shared copy of Garry's Mod from an account which is banned and then kicks them
-- This goes in:
-- garrysmod/garrysmod/lua/autorun/account-sharing.lua
-- Or, if you want to keep your custom code separate from the default GMod server files:
-- garrysmod/garrysmod/addons/accountsharing/lua/autorun/account-sharing.lua
-- You will need to make some of these folders
-- Original post http://facepunch.com/showthread.php?t=1341204&p=43469693&viewfull=1#post43469693
-- Credit to McSimp
local APIKey = "APIKEYGOESHERE" -- See http://steamcommunity.com/dev/apikey
@BadgerCode
BadgerCode / weapon_info.lua
Created August 31, 2020 09:55
Garry's Mod code snippet for finding out information about weapons
-- Commands:
-- weapons_list
-- Prints out a basic list of all weapons
-- weapon_info <classname>
-- Prints out detailed information about a specific weapon
function table.Select(tbl, f)
local t = {}
for k,v in pairs(tbl) do
@BadgerCode
BadgerCode / garrysmod-folder.md
Last active June 8, 2021 19:13
How to find your Garry's Mod Folder and the GMad/GMPublish programs

How to find your Garry's Mod folder

  1. Open Steam
  2. Right click on Garry's Mod
  3. Select Properties
  4. Select Local Files
  5. Click Browse

Example Pictures

Properties

@BadgerCode
BadgerCode / build-cubemaps.md
Last active April 9, 2024 01:02
Build cubemaps for a Garry's Mod map in both Low Dynamic Range (LDR) and High Dynamic Range (HDR)

This fixes issues with objects and weapons appearing very shiny in the map.

  • You must have a copy of the map in your Garry's Mod folder
  • If you wish to fix a workshop map, you must first extract the map file

Before running the steps below, enable HDR:
Options -> Video -> Advanced -> "High Dynamic Range" -> Full

Open the map in singleplayer and enter the following console commands

@BadgerCode
BadgerCode / source-sdk-replace-map-materials.md
Created July 16, 2020 18:49
Replace materials within a compiled map
@BadgerCode
BadgerCode / hammer_gmod_csgo_setup.md
Created June 15, 2020 15:35
Setup Garry's Mod Hammer to use CS:GO assets for map making

This ensures that the CS:GO assets you use in your map will be available for packing into the map.

CS:S & CS:GO

This will:

  • Removes any assets which are already available in GMod/HL2
  • Resolves conflicts between CS:S and CS:GO resources with the same name

Process

@BadgerCode
BadgerCode / remove_duplicate_files.ps1
Last active May 17, 2020 13:29
Uses powershell to remove files from one directory, if they exist in the same relative path in another directory
# Folder to REMOVE files from
$targetPath = "C:\Users\mike-\Desktop\csgo\"
# Folder to CHECK for files
$sourcePath = "C:\Users\mike-\Desktop\css\"
# Sub-folder that exists in both folders
$assetFolder = "models"
# Set to $true to output duplicates
@BadgerCode
BadgerCode / steam_partner_api_examples.md
Last active December 16, 2023 22:08
Steam partner API examples