Skip to content

Instantly share code, notes, and snippets.

View AaronMcHale's full-sized avatar

Aaron McHale AaronMcHale

View GitHub Profile
@AaronMcHale
AaronMcHale / random-cards.php
Last active June 13, 2021 13:58
PHP script to get two random cards from a standard deck of cards. I didn't actually need this, I made it to prove to someone else that it was possible to write it in a cleaner way. Originally written on 2020/08/08.
<?php
// Initialise an empty array, not strictly necessary but good practice
$cards = [];
// A deck of cards is split into 4 types of cards, we use this
// when building the names of every card, in other words, each
// card is named "X of Y".
$card_suffixes = [
'of Clubs',
'of Spades',
@AaronMcHale
AaronMcHale / KeybaordVisualizer.vbs
Last active May 14, 2016 14:28
Script to toggle on and off the Keyboard Visualizer application for Razer Chroma devices
' VBScript that toggles starting and stopping the Keyboard Visualizer application
' Script written by AaronMcHale (https://github.com/AaronMcHale)
' Helper code to get the path of your Desktop (you can modify this to use other folders
' like Documents), I use this because I have Keyboard Visualiser stored on my desktop
set WshShell = WScript.CreateObject("WScript.Shell")
strSpecialPath = WshShell.SpecialFolders("Desktop")
' CONFIGURATION SECTION