Skip to content

Instantly share code, notes, and snippets.

View chgeuer's full-sized avatar
🏠
Working from Düsseldorf

Dr. Christian Geuer-Pollmann chgeuer

🏠
Working from Düsseldorf
View GitHub Profile
namespace ecdsa
{
using System;
using System.Numerics;
using System.Security.Cryptography;
using System.Text;
using System.Linq;
class Program
{

Spin up a container registry

az acr create \
    --name="${acr_name}" \
    --resource-group="${RGNAME}" \
    --location="${K8SLOCATION}" \
    --sku="Basic" \
    --admin-enabled=true
@chgeuer
chgeuer / azuredeploy.json
Created February 2, 2018 12:29
regional image
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"imageSubscription": { "defaultValue": "4ade7712-3c4e-4ab2-bf30-e7577ac71995", "type": "string" },
"imageResourceGroup": { "defaultValue": "imagesource", "type": "string" },
"imageName": { "defaultValue": "aregionalimage", "type": "string" },
"dnsName": { "defaultValue": "myimagecopy", "type": "string" }
},
"variables": {
@chgeuer
chgeuer / latency.markdown
Created February 2, 2018 10:51 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

namespace AccountSAS
{
using System;
using System.Linq;
using System.Collections.Generic;
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using System.Web;
apiVersion: batch/v1
kind: Job
metadata:
name: ls
spec:
template:
spec:
restartPolicy: Never
containers:
- name: ls

Christmas Actor Hackday

Goal of the "Christmas Actor Hack" is to get in touch with the Actor model. That includes:

  • actors (or grains as Orleans calls it, or processes as the Erlang/Elixir community calls it)
  • passing immutable messages between actors
  • each actor having a mailbox which it processes
  • a simple programming model where actor code apprears single-threaded, because concurrency is handled by the actor system
  • different implementations, such as
  • the BEAM (Bogdan's Erlang Abstract Machine), which is the Erlang VM

Pfannkuchen

Zutaten

  • 4 Ei(er)
  • 2 EL Zucker
  • 400 ml Milch
  • 1 Prise(n) Salz
  • 200 g Mehl
  • 1 Msp. Backpulver
#!/bin/bash
/usr/local/bin/dockerd --host=unix:///var/run/docker.sock --storage-driver=vfs &
docker version