Skip to content

Instantly share code, notes, and snippets.

View bls1999's full-sized avatar

Ben bls1999

View GitHub Profile
@bls1999
bls1999 / calculator.cpp
Last active June 14, 2022 23:40
A small programming challenge for the purpose of learning C++.
#include <iostream>
using namespace std;
class ComplexNumber {
public:
double real;
double imag;
ComplexNumber(double r, double i) {
real = r;
@bls1999
bls1999 / pr2sim.ahk
Created February 8, 2021 07:56
An AutoHotkey script intended to open five Platform Racing 2 windows in an organized fashion for the purpose of simming/macroing experience points.
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
; Get/set config
IniRead, pr2Path, pr2sim.ini, location, path
if (!pr2Path or !FileExist(pr2Path)) { ; If settings don't already exist
FileSelectFile, pr2Path, 3, , Select the PR2 Executable, Platform Racing 2 (*.exe)
if (ErrorLevel) {
Exit, 0
@bls1999
bls1999 / rng_contest_ajax.php
Created January 13, 2021 01:36
A quick jQuery/Ajax/PHP implementation of a simple RNG contest.
<!--
MIT License
Copyright (c) 2021 Ben Schwartz
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
@bls1999
bls1999 / soundcloud.php
Last active July 25, 2020 06:04
MyBB plugin: Advanced MyCode to embed a SoundCloud track/set.
<?php
/*
MIT License
Copyright (c) 2020 Ben Schwartz
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@bls1999
bls1999 / raffle_choose_winners.php
Last active July 1, 2020 04:55
Winners picker for the time-based raffle program (w/ mybb integration)
<?php
/*
MIT License
Copyright (c) 2020 Ben Schwartz
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@bls1999
bls1999 / raffle.php
Last active June 5, 2020 20:02
Time-based raffle program (w/ mybb integration)
<?php
/*
MIT License
Copyright (c) 2020 Ben Schwartz
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@bls1999
bls1999 / date.js
Created September 30, 2019 06:21
Formatted JavaScript current date/time function.
// outputs as: Monday, September 30, 2019 at 2:21:45am
function getReadableDate()
{
// init arrays
var days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
// get date var to work with
var now = new Date();
@bls1999
bls1999 / reset_repo.sh
Created March 16, 2018 15:34
Reset fork to upstream
git remote add upstream https://github.com/some_user/some_repo
git fetch upstream
git checkout master
git reset --hard upstream/master
git push origin master --force
@bls1999
bls1999 / first_names.php
Last active December 19, 2017 14:37 — forked from brysonian/first_names.php
list of first names formatted as a PHP array
<?php
$names = array(
'Anthony',
'Alexander',
'Angela',
'Allison',
'Arthur',
'Ana',
'Alex',
@bls1999
bls1999 / array-names.py
Created December 19, 2017 11:58 — forked from ruanbekker/array-names.py
Array of First Names
names = ["Aaran", "Aaren", "Aarez", "Aarman", "Aaron", "Aaron-James", "Aarron", "Aaryan", "Aaryn", "Aayan", "Aazaan", "Abaan", "Abbas", "Abdallah", "Abdalroof", "Abdihakim", "Abdirahman", "Abdisalam", "Abdul", "Abdul-Aziz", "Abdulbasir", "Abdulkadir", "Abdulkarem", "Abdulkhader", "Abdullah", "Abdul-Majeed", "Abdulmalik", "Abdul-Rehman", "Abdur", "Abdurraheem", "Abdur-Rahman", "Abdur-Rehmaan", "Abel", "Abhinav", "Abhisumant", "Abid", "Abir", "Abraham", "Abu", "Abubakar", "Ace", "Adain", "Adam", "Adam-James", "Addison", "Addisson", "Adegbola", "Adegbolahan", "Aden", "Adenn", "Adie", "Adil", "Aditya", "Adnan", "Adrian", "Adrien", "Aedan", "Aedin", "Aedyn", "Aeron", "Afonso", "Ahmad", "Ahmed", "Ahmed-Aziz", "Ahoua", "Ahtasham", "Aiadan", "Aidan", "Aiden", "Aiden-Jack", "Aiden-Vee", "Aidian", "Aidy", "Ailin", "Aiman", "Ainsley", "Ainslie", "Airen", "Airidas", "Airlie", "AJ", "Ajay", "A-Jay", "Ajayraj", "Akan", "Akram", "Al", "Ala", "Alan", "Alanas", "Alasdair", "Alastair", "Alber", "Albert", "Albie", "Aldred", "Al