Skip to content

Instantly share code, notes, and snippets.

View marth8880's full-sized avatar

Aaron Gilbert marth8880

  • Deep Silver Dambuster
  • Edinburgh, UK
View GitHub Profile
-- Adds random classes to the specified team, optionally loading the required lvls for them.
-- * `teamIndex` The index of the team to add the classes for.
-- * `numberToPick` The number of classes to randomly pick and add.
-- * `possibleClasses` Table forming a list of classes to select from.
-- - `className` The classname of the unit. This should be the same as what you would pass to `AddUnitClass` or `SetupTeams`.
-- - `minUnits` The minimum number of AI for the unit. This should be the same as what you would pass to `AddUnitClass` or `SetupTeams`.
-- - `maxUnits` The maximum number of AI for the unit, or if it is an unlock class the maximum number of units overall. This should be
-- the same as what you would pass to `ReadDataFile` if you were only loading up a single (or no) child lvl. So
-- "dc:SIDE\\test.lvl" or "dc:SIDE\\test.lvl;test_inf_engineer". The function will combine loading child lvls from the same
@Calrissian97
Calrissian97 / UNMUNGE.bat
Last active September 10, 2018 23:48
Easy swbf-unmunge batch file for default unmunge
@echo off
title SWBF-Unmunge tool: Default BF II
REM This batch is used to save time for inputting commands into CMD for SWBF-Unmunge
REM Written by Calrissian97 (c) 2018
ECHO ----------------------------------------------------------------------------
ECHO Note: filenames are NOT case-sensitive! ;-)
ECHO ----------------------------------------------------------------------------
:start
@marjanmo
marjanmo / youtube_to_mp3_splitter.py
Last active August 19, 2025 13:01
Download Youtube music compilation into separate .mp3 files
import subprocess
import sys, os
"""
#####################################
##### YOUTUBE TO MP3 SPLITTER ######
#####################################
@lukas-h
lukas-h / license-badges.md
Last active March 15, 2026 12:21
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@rponte
rponte / get-latest-tag-on-git.sh
Last active February 2, 2026 14:38
Getting latest tag on git repository
# The command finds the most recent tag that is reachable from a commit.
# If the tag points to the commit, then only the tag is shown.
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object
# and the abbreviated object name of the most recent commit.
git describe
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix:
git describe --abbrev=0
# other examples
@Schlechtwetterfront
Schlechtwetterfront / pointaligner.py
Created October 9, 2013 05:49
Moves all selected points to an absolute position. Default zeroes all selected points on the X-Axis. Usage: >Copy the code to the script editor and execute it. >OR Create a script button and paste this code into the script button's script window.
from win32com.client import constants as const
xsi = Application
# Possible Values: siX, siY, siZ, siXY, siXZ, siYZ, siXYZ.
axis = const.siX
# Set to desired absolute values.
x = 0
y = 0
z = 0
def move_points():
@strycore
strycore / vdf_parser.py
Created June 8, 2013 15:18
Parser for Steam VDF files
import os
import json
def vdf_parse(steam_config_file, config):
line = " "
while line:
line = steam_config_file.readline()
if not line or line.strip() == "}":
return config
@jrus
jrus / lua-uuid.lua
Created July 29, 2012 09:26
quick lua implementation of "random" UUID
local random = math.random
local function uuid()
local template ='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'
return string.gsub(template, '[xy]', function (c)
local v = (c == 'x') and random(0, 0xf) or random(8, 0xb)
return string.format('%x', v)
end)
end
@isa
isa / gist:1776881
Created February 9, 2012 02:58
Windows 2000 Source Code
/* Source Code Windows 2000 */
#include "win31.h"
#include "win95.h"
#include "win98.h"
#include "workst~1.h"
#include "evenmore.h"
#include "oldstuff.h"
#include "billrulz.h"
#include "monopoly.h"