Skip to content

Instantly share code, notes, and snippets.

View Headline's full-sized avatar

Headline

View GitHub Profile
@Headline
Headline / catall.rs
Created April 7, 2022 17:40
Used for concatenating all code in a dir into a single output for homework submission
use std::{env, fs};
use std::fs::File;
use std::io::Read;
use std::path::PathBuf;
use std::process::exit;
fn output_help() {
println!("Usage: catall [OPTIONS] <directory>\n");
println!("Concatenates all files within a directory to output");
println!("Options:");
@Headline
Headline / gtaafk.ahk
Created June 12, 2020 05:54
A simple AFK script for Grand Theft Auto V
; MIT License
; Copyright (c) 2020 Michael "Headline" Flaherty
; Permission is hereby granted, free of charge, to any person obtaining a copy
; of this software and associated documentation files (the "Software"), to deal
; in the Software without restriction, including without limitation the rights
; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
; copies of the Software, and to permit persons to whom the Software is
; furnished to do so, subject to the following conditions:
[DXR]
# Some global options here, if you like
[yourproject]
source_folder = /home/dxr/sourcemod
build_command = mkdir build; cd build; python ../configure.py --enable-optimize --sdks=episode1,css,tf2,l4d2,csgo,dota; ambuild
@Headline
Headline / audioglitch.py
Last active December 15, 2019 04:57
A python script which allows you to repeat the last sample of audio repeatedly while holding down the button
# Audio Glitch
# Michael "headline" Flaherty - [email protected] - 12/14/2019
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
/* [RETAKES] Priority Queue
*
* Copyright (C) 2018 Michael Flaherty // michaelwflaherty.com // [email protected]
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
@Headline
Headline / versioning.py
Created February 5, 2018 10:05
Used for replacing version numbers in c# source files (replaces $$version$ w/ APPVEYOR_BUILD_VERSION)
import os
import os.path
def get_clean_path(array):
somestr = ""
for x in range(0, len(array) - 1):
somestr += array[x] + "\\"
return somestr
def do_version_replace(current):
@Headline
Headline / buildsm.bat
Last active June 14, 2022 21:36
Script used to clean and start contributing with a fresh environment
@echo off
rmdir /S /Q alliedmodders
mkdir alliedmodders
cd alliedmodders
:: If you want YOUR sourcemod fork, change this url
git clone --recursive http://github.com/alliedmodders/sourcemod
git clone --recursive https://github.com/alliedmodders/metamod-source
git clone --recursive http://github.com/alliedmodders/hl2sdk hl2sdk-sdk2013
@Headline
Headline / decompileall.py
Created February 5, 2018 10:01
Recursively searches all subdirectories for plugins, decompiles them, and appends their output to output.txt
import os
import os.path
def get_clean_path(array):
somestr = ""
for x in range(0, len(array) - 1):
somestr += array[x] + "\\"
return somestr
path = get_clean_path(os.path.realpath(__file__).split("\\"))
@Headline
Headline / LineCounter.py
Last active September 5, 2017 08:42
A python script to count the amount of lines of text for all of it's adjacent files & files in sub directories.
import os
import os.path
import mimetypes
import locale
def get_clean_path(array):
somestr = ""
for x in range(0, len(array) - 1):
somestr += array[x] + "\\"
return somestr
@Headline
Headline / README.md
Last active June 2, 2017 17:27
A simple TTS class which uses Talkify.net's TTS service to play a given input.

Simple TTS

A simple TTS class which uses Talkify.net's TTS service to play a given input. Test out the service today http://talkify.net/

Dependencies

Unforunately this also requires mp3plugin.jar to be added to your class path in order for mp3 decoding to work properly. mp3plugin.jar is an old library that's hard to find on the internet now adays. I've provided a link to one from my dropbox below. Enjoy

https://www.dropbox.com/s/0nztyq0ghvjdnyh/mp3plugin.jar?dl=0