Skip to content

Instantly share code, notes, and snippets.


Ion Mincu dburner

View GitHub Profile
dburner / EvilStringHelper.cs
Created Mar 12, 2018 — forked from dtao/EvilStringHelper.cs
Devious C# class that makes .NET strings mutable without requiring the /unsafe compiler switch
View EvilStringHelper.cs
public static class EvilStringHelper
private static readonly Action<string, int, char> _setChar;
private static readonly Action<string, int> _setLength;
static EvilStringHelper()
if (Environment.Version.Major < 4)
MethodInfo setCharMethod = typeof(string).GetMethod(
dburner / gist:77bbdcaa5338d1859bb8caa88bdf2b6a
Created Sep 18, 2017 — forked from kyledrake/gist:d7457a46a03d7408da31
Creating a self-signed SSL certificate, and then verifying it on another Linux machine
View gist:77bbdcaa5338d1859bb8caa88bdf2b6a
# Procedure is for Ubuntu 14.04 LTS.
# Using these guides:
openssl genrsa -aes256 -out ca.key 2048
openssl req -new -x509 -days 7300 -key ca.key -sha256 -extensions v3_ca -out ca.crt
dburner /
Created Sep 6, 2017 — forked from mdo/
Instructions for how to affix an Ikea Gerton table top to the Ikea Bekant sit-stand desk frame.

Ikea Bekant standing desk with Gerton table top

dburner / gist:b8b219722ade9a1831e56e7bf00239cf
Created May 25, 2017 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.
View gist:b8b219722ade9a1831e56e7bf00239cf

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
dburner /
Created May 19, 2017 — forked from mbollmann/
My attempt at creating an LSTM with attention in Keras
class AttentionLSTM(LSTM):
"""LSTM with attention mechanism
This is an LSTM incorporating an attention mechanism into its hidden states.
Currently, the context vector calculated from the attended vector is fed
into the model's internal states, closely following the model by Xu et al.
(2016, Sec. 3.1.2), using a soft attention model following
Bahdanau et al. (2014).
The layer expects two inputs instead of the usual one:
dburner / EFExtensions.cs
Created May 5, 2017 — forked from ondravondra/EFExtensions.cs
C# extension for executing upsert (MERGE SQL command) in EF with MSSQL
View EFExtensions.cs
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
namespace EFExtensions
dburner /
Created Apr 26, 2017 — forked from rilut/
A keras attention layer that wraps RNN layers.
A keras attention layer that wraps RNN layers.
Based on tensorflows [attention_decoder](
and [Grammar as a Foreign Language](
date: 20161101
author: wassname
dburner /
Created Mar 18, 2017 — forked from mtreviso/
Variable sentence size CNN + RNN with Keras
# vocabulary = OrderedDict()
input_length = None
vocabulary_size = max(vocabulary.values()) + 1
weights_w2v = list(map(Word2Vec.__getitem__, vocabulary.keys()))
embedding_size len(weights_w2v[0])
nb_classes = 5
# CNN hyperparms
nb_filter = 64
filter_length = 5
dburner / Example1.cs
Created Dec 19, 2016 — forked from davidfowl/Example1.cs
How .NET Standard relates to .NET Platforms
View Example1.cs
namespace Analogy
/// <summary>
/// This example shows that a library that needs access to target .NET Standard 1.3
/// can only access APIs available in that .NET Standard. Even though similar the APIs exist on .NET
/// Framework 4.5, it implements a version of .NET Standard that isn't compatible with the library.
/// </summary>INetCoreApp10
class Example1
public void Net45Application(INetFramework45 platform)

Angular2 + JSPM cheat sheet

First time setup

  • install jspm beta: npm install -g jspm@beta
  • set up your project: jspm init
  • install dependencies: jspm install angular2 reflect-metadata zone.js es6-shim

This will create a jspm_packages folder, and a config.js file.

Open the config.js file - this file manages options for the System.js loader - tweak it as appropriate

You can’t perform that action at this time.