Skip to content

Instantly share code, notes, and snippets.

View nathan-fiscaletti's full-sized avatar
🔨
Reinventing the wheel

Nathan Fiscaletti nathan-fiscaletti

🔨
Reinventing the wheel
View GitHub Profile
/**
* A string builder with built-in support for ANSI escape sequences.
*
* @author Nathan Fiscaletti
*/
public class AnsiStringBuilder
{
/**
* Reset options.
*/
<?php
if (! function_exists('_or')) {
/**
* Shorthand OR comparison.
*
* @param mixed $compareTo
* @param mixed $values
*/
function _or(...$values) {
@nathan-fiscaletti
nathan-fiscaletti / Fader.cs
Last active March 29, 2023 04:29
A C# class used to control fading forms in and out
using System;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace FormFader
{
/// <summary>
/// An object used to control fading forms in and out.
/// </summary>
class Fader
#include <stdio.h>
#include <stdlib.h>
// Type Definitions
// These are the type definitions that can be used to check for type
// They need to be unique so that only types starting with these
// prefixes will be presumed to be of the type specified.
typedef enum type {
@nathan-fiscaletti
nathan-fiscaletti / db_reflect
Last active December 31, 2018 01:35
A database reflection daemon for MySql
#!/bin/bash
# Database Reflector
# Written by Nathan Fiscaletti
# Version 0.1.4
# Released 1512531374
# You can add more reflections here
# Use format s_user@s_host:s_pass:s_db>d_user@d_host:d_pass:d_db
# Example: "root@127.0.0.1:pass:db_a>user@8.8.8.8:pass:db_b"
@nathan-fiscaletti
nathan-fiscaletti / vagrant_provisioning_script.sh
Last active March 12, 2019 18:36
A provisioning script for the Synful API Framework
#!/bin/bash
# Usage
# ./synful_provisioning_script.sh [version|stable|dev-unstable] [mysql-password] [y/n]
# The first parameter is the version to install,
# The second parameter is the MySql password to use,
# The third parameter is either y/n for allowing Sql over network.
# Example Usage:
@nathan-fiscaletti
nathan-fiscaletti / cursor.sh
Created January 5, 2018 20:20
A bash script for controlling the cursor (with a few tests)
#!/bin/bash
# A library of bash functions for moving the cursor around.
function main()
{
# Run the basic test
run_test
PUBG meets BF meets Planetside?
WIP, Very base line idea.
A squad consists of four players, and is assigned to one of the two major teams.
Possibly allow for modes with two player squads, but I'm not sure i want a solo
version yet or not.
Each Squad spawns into a private lobby that only has them and a "Planning Room".
@nathan-fiscaletti
nathan-fiscaletti / TypeCoercion.php
Created March 28, 2018 20:16
Simple multi-type return functions with strict typing and type coercion
<?php
class MyClass
{
private $data;
public function __construct(array $value)
{
$this->data = $value;
}
@nathan-fiscaletti
nathan-fiscaletti / symbolicate.sh
Last active September 24, 2023 21:44
A tool for symbolicating iOS crash reports.
#!/bin/bash
CRASH=$1
APP=$2
ARCH=$3
OUTPUT=$4
# This script will fully symbolicate an iOS Crash Report
# Usage: ./symbolicate.sh mycrash.crash MyApp.app arch64 output.crash
#