Skip to content

Instantly share code, notes, and snippets.

View matthiasgoergens's full-sized avatar

Matthias Görgens matthiasgoergens

View GitHub Profile
#!/usr/bin/env python3
from collections import defaultdict
from datetime import datetime, timedelta
import requests
from bisect import bisect_left
from typing import List, Dict, Any
from bisect import bisect
@matthiasgoergens
matthiasgoergens / README.txt
Created November 15, 2018 07:28 — forked from ncw/README.txt
Client side certificates with go
This demonstrates how to make client side certificates with go
First generate the certificates with
./makecert.sh test@test.com
Run the server in one terminal
go run server.go
@matthiasgoergens
matthiasgoergens / Main.hs
Last active June 3, 2016 01:49 — forked from luciferous/Main.hs
STM example
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
import Network ( withSocketsDo, listenOn, PortID(..) )
import Network.Socket ( accept, close, recv, send, Socket )
import Control.Concurrent ( forkIO, threadDelay, ThreadId )
import Control.Concurrent.STM ( atomically
, orElse
, newTChan
, readTChan
{-# LANGUAGE OverloadedStrings, RecordWildCards, LambdaCase #-}
import Conduit
import Data.Conduit
import Data.Conduit.Network
import qualified Data.ByteString.Char8 as BS
import Data.Conduit.TMChan
import Text.Printf (printf)
import Control.Concurrent.STM
import qualified Data.Map as Map
class MyClass:
def my_function(self, nice_verbose_variable):
some_other_variable = another_fairly_long_function(nice_verbose_variable,
"oh look, here's a str" +
"ing how great a layou" +
"t idea this is!")
some_other_variable = another_fairly_long_function(
nice_verbose_variable,
"oh look, here's a string, how great a layout idea this is!"