Skip to content

Instantly share code, notes, and snippets.

View TheDarkCode's full-sized avatar

Mark Hamilton TheDarkCode

View GitHub Profile
@TheDarkCode
TheDarkCode / DateNumerology.swift
Created May 13, 2019 07:33
Swift Numerology - Date Numerology Example
public extension Int {
var digits: [Int] {
return String(self).compactMap{ Int(String($0)) }
}
var reduction: Int {
return self.digits.reduce(0,+)
}
}
@TheDarkCode
TheDarkCode / Gematria.swift
Last active May 13, 2019 07:36
Swift Gematria - English Ordinal Example
public extension Character {
func EnglishOrdinal() - > Int {
switch (self) {
case "a":
return 1;
case "b":
return 2;
@TheDarkCode
TheDarkCode / QClockExtensions.cs
Created January 5, 2019 22:23
QClock Conversion Extensions
using System;
using System.Collections.Generic;
using System.Text;
namespace QClockExtensions
{
public static class DateExtensions
{
public static int ToQClockMinute(this DateTime date)
{
@TheDarkCode
TheDarkCode / Program.cs
Created January 4, 2019 04:34
QMap Command Line
using HtmlAgilityPack;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
@TheDarkCode
TheDarkCode / Program.cs
Created January 1, 2019 17:54
Qanon Post Parser
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
@TheDarkCode
TheDarkCode / DiscordBot.cs
Created December 22, 2018 08:51
Discord Bot .NET Core
using Discord;
using Discord.WebSocket;
using Discord.Commands;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
@TheDarkCode
TheDarkCode / Program.cs
Created November 6, 2018 23:13
FBI Election Complaint Submission Client
using System;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
namespace FBI.ElectionComplaint.Client
{
@TheDarkCode
TheDarkCode / StateBoundaries.sql
Created October 6, 2018 20:34 — forked from jakebathman/StateBoundaries.sql
The approximate max/min latitude and longitude for all states and major territories
-- Create the table
CREATE TABLE IF NOT EXISTS `StateBoundaries` (
`State` varchar(10) DEFAULT NULL,
`Name` varchar(255) DEFAULT NULL,
`MinLat` varchar(50) DEFAULT NULL,
`MaxLat` varchar(50) DEFAULT NULL,
`MinLon` varchar(50) DEFAULT NULL,
`MaxLon` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@TheDarkCode
TheDarkCode / Delay.swift
Created June 22, 2016 08:09
Delay Utility for GCD in Swift 3
//
// Delay.swift
// Delay Utility for GCD in Swift 3
//
// Created by Mark Hamilton on 6/21/16.
// Copyright © 2016 dryverless. All rights reserved.
//
/*
@TheDarkCode
TheDarkCode / DecayCounter.swift
Created June 19, 2016 11:02
Half Life Equation in Swift
//
// DecayCounter.swift
// half-life-equation
//
// Created by Mark Hamilton on 6/19/16.
// Copyright © 2016 dryverless. All rights reserved.
//
import Foundation