Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View tomzorz's full-sized avatar
🗯️
"edza [20:52] jet fuel cant melt static types"

Tamás Deme tomzorz

🗯️
"edza [20:52] jet fuel cant melt static types"
View GitHub Profile
@tomzorz
tomzorz / MySubstrings.cs
Created November 18, 2019 14:49
various C# / .net implementations of a custom substring function
using System;
using System.Linq;
using System.Text;
namespace MySubstring
{
// ReSharper disable once ClassNeverInstantiated.Global
public class Program
{
// ReSharper disable once UnusedParameter.Global

Keybase proof

I hereby claim:

  • I am tomzorz on github.
  • I am tomzorz (https://keybase.io/tomzorz) on keybase.
  • I have a public key whose fingerprint is EA0A 8160 F5DB BF43 AE8E FB71 3933 FA65 8690 2290

To claim this, I am signing this object:

cGxhbmUgdGlja2V0cyBhcmUgY2hlYXBlciBvbiB0dWVzZGF5cw==
@tomzorz
tomzorz / things
Created October 8, 2018 08:12
retelab2 aut1 prep
45350ed10898686cc658debecd7ac7c6
@tomzorz
tomzorz / createServicePrincipal.ps1
Created June 7, 2018 14:38
Create Azure Service Principal
# set params
$subid = '{subscription id here}'
$uri = 'http://{uri here}'
$pp = '{password here}'
$dn = '{display name here}'
@tomzorz
tomzorz / UnityNetworkDiscoveryReimplementation.cs
Created December 19, 2017 18:07
Reverse engineering the Unity Network Discovery protocol to broadcast from a 3rd party source
// see blog post here: https://shoreparty.org/reverse-engineering-the-unity-network-discovery-protocol-9cd01280ed08
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.Text;
using System.Threading;
@tomzorz
tomzorz / Enable_vt100_csharp.cs
Created April 12, 2017 19:26
Enable VT100 for the current console window from .NET Core
using System;
using System.Runtime.InteropServices;
namespace Vt100Test
{
public class Program
{
// ReSharper disable InconsistentNaming
@tomzorz
tomzorz / Real.cs
Created July 21, 2015 09:40
it had to be done
// do this
namespace Helpers
{
public static class Helper
{
public static async Task PleaseStandUpAsync(this SemaphoreSlim s)
{
await s.WaitAsync();
}
JSON.stringify(user_dict, function( key, value) {
if(key[0] == '_') {
return "cref";
} else {
return value;
};
});
// for https://github.com/arank/marauders-map
@tomzorz
tomzorz / NavigationState.cs
Created November 5, 2014 12:31
Manageable WinRT NavigationState string
/// <summary>
/// A class to parse and edit the WinRT internal navigationState string (Windows 6.3.9600, 2014.11.04.)
/// </summary>
public class NavigationState
{
public static readonly Dictionary<Type, int> ValidParameterTypes = new Dictionary<Type, int>()
{
{typeof(byte), 1},
{typeof(short), 2},
{typeof(ushort), 3},