Skip to content

Instantly share code, notes, and snippets.

View CameronHall's full-sized avatar
🙉

Cameron Hall CameronHall

🙉
View GitHub Profile
@CameronHall
CameronHall / elasticsearch.sh
Last active November 9, 2023 04:16
Elasticsearch Config
#!/bin/sh
set -e;
function es_uninstall {
yum remove java-1.8.0-amazon-corretto -y
rpm -e `rpm -qa elasticsearch`
}
function es_install {
# Set Environment Variables
@CameronHall
CameronHall / dnsmasq.sh
Last active July 7, 2023 05:03
Installation of dnsmasq macOS Ventura 13.3.1 (a). Requires sudo
#!/bin/bash
set -e
COLOUR_GREEN="\033[0;32m"
COLOUR_RED="\033[0;31m"
COLOUR_OFF='\033[0m'
function echo_success {
echo -e "${COLOUR_GREEN}$1${COLOUR_OFF}"
}
@CameronHall
CameronHall / date_fixer.py
Last active May 22, 2021 12:30
Photo Date Fixer
import piexif
import os
from shutil import copyfile
from datetime import datetime
def get_diff(path_name, alleged_date):
alleged_date = datetime.strptime(alleged_date, '%Y:%m:%d %H:%M:%S')
exif_dict = piexif.load(path_name)
exif_date = exif_dict['0th'][piexif.ImageIFD.DateTime].decode('ascii')
@CameronHall
CameronHall / SynergyAPI.ps1
Created September 18, 2019 07:04
Synergy Wholesale API - Powershell Client
$ResellerID = <ResellerID>
$APIKey = "<APIKey>"
$APIAuth = @{
resellerID = $ResellerID
apiKey = $APIKey
}
$APISession = New-WebServiceProxy -Uri "https://api.synergywholesale.com/?wsdl"

md5("BE" (2 bytes) + 64-bit SteamID (8 bytes))

@CameronHall
CameronHall / camoState.sqf
Last active August 29, 2015 14:09
Speed/animationState camo selection
if (isServer) then {
private ['_unit','_speed','_animationState','_animation','_limit','_texture'];
_unit = 'className'; //edit class name here
_animation = 'animationName'; //edit animation name here
_speedLimit = <5; // Speed limiter, CAN use operands and irrational numbers.
_texture = [0, "/pbo/texture.paa"]; //[hiddenselection, path]
if(typeOf _unit) then
{
while {true} do
{