This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!" |