Skip to content

Instantly share code, notes, and snippets.

@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active May 22, 2024 20:25 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@starquake
starquake / StripHtml.cs
Last active February 2, 2022 17:04 — forked from frankhale/StripHtml.cs
Strip HTML using HtmlAgilityPack
public static string StripHtml(this string value)
{
HtmlDocument htmlDoc = new HtmlDocument();
htmlDoc.LoadHtml(value);
if (htmlDoc == null)
return value;
return htmlDoc.DocumentNode.InnerText;
}
@jimbojetset
jimbojetset / EnigmaMachine.cs
Created January 10, 2017 20:20
Enigma Emulator c#
using System;
using System.Text;
using System.Diagnostics;
namespace Enigma
{
class EnigmaMachine
{
private const string _alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
private static Tuple<string, int, int> _rotor_Blank = new Tuple<string, int, int>("ABCDEFGHIJKLMNOPQRSTUVWXYZ", -99, -99);
@klimaye
klimaye / itemAtIndexInASplitString
Created December 27, 2013 13:56
sql scaler function to return an item at a specific index in a split string. Was useful to me in a select clause parsing a value like Age_0_14
CREATE FUNCTION dbo.itemAtIndexInASplitString( @stringToSplit VARCHAR(MAX), @delimiter VARCHAR(5), @indexToReturn int)
RETURNS
varchar(max)
AS
BEGIN
DECLARE @returnList TABLE ([ID] int, [Name] [nvarchar] (500))
DECLARE @name NVARCHAR(255)
DECLARE @pos INT
DECLARE @index INT
DECLARE @return_value varchar(max)
@frankhale
frankhale / StripHtml.cs
Created August 2, 2012 21:25
Strip HTML using HtmlAgilityPack
public static string StripHtml(this string value)
{
HtmlDocument htmlDoc = new HtmlDocument();
htmlDoc.LoadHtml(value);
if (htmlDoc == null)
return value;
StringBuilder sanitizedString = new StringBuilder();
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active May 20, 2024 11:33
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S