Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Toliman.Cryptography
{
/// <summary>
/// comparable, equatable byte[]
| NTVS | TSLS
---------------------------|--------|---------
Show compiler command line | + | -
Specify building options | - | +
Wraps npm | + | -
Generate AMD | - | +
Generate CJS | + | +
Use node_modules | + | -
Clean sollution [1] | + | -
Valid import system [2] | + | -
@wizzard0
wizzard0 / asyncReduce.ts
Last active August 29, 2015 14:05
разума сон чудовищ рождает
export function asyncReduce<T, TR>(list: T[], callback:
(prev: Promise<TR>, cur: T, i: number, list: T[], cont: (result: TR) => void,
aborter: (reason: any) => void, breaker: (result: TR) => void) => void,
interval?: number, initial?: TR): Promise<TR> {
return new Promise(function (resolveAll, rejectAll) {
var iv = interval || 100;
var res: TR = undefined;
var shouldSkip = false;
var breaker = function (r: TR) {
res = r;
@wizzard0
wizzard0 / Program.cs
Created December 29, 2014 14:19
Type-level recursion :)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
0 = Success
1 = Operation not permitted
2 = No such file or directory
3 = No such process
4 = Interrupted system call
5 = Input/output error
6 = No such device or address
7 = Argument list too long
8 = Exec format error
@wizzard0
wizzard0 / fl.css
Created August 4, 2014 15:57
React floatLabel
.floatlabel {
display: flex;
position: relative;
flex-direction: column;
width: 300px;
margin-top: 20px;
}
.floatlabel > label {
position: absolute;
@wizzard0
wizzard0 / Main.hx
Created September 2, 2012 12:59
microhttp-hx
package crossplatformtest;
import haxe.Log;
import neko.vm.Thread;
/**
* ...
* @author Wizzard
*/
class Main
@wizzard0
wizzard0 / DumbTable.cs
Created September 29, 2012 21:28
dumb table
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace CryptoBoxLib.Data
{
public class DumbTable<T, V> where T : IEquatable<T>
{
public List<KeyValuePair<T, V>>[] Buckets;
@wizzard0
wizzard0 / client.cs
Created October 27, 2012 04:32
Microchat
using System;
using System.Net;
using Newtonsoft.Json;
using System.Security.Cryptography.X509Certificates;
namespace Chat
{
class Program
{
private static bool RemoteCertificateValidate(object sender, X509Certificate cert, X509Chain chain, System.Net.Security.SslPolicyErrors error)
@wizzard0
wizzard0 / GEF.cs
Last active December 11, 2015 13:38
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GenericEntityFramework
{
/// <summary>