Skip to content

Instantly share code, notes, and snippets.

package errch
import (
"sync"
)
func New() (<-chan error, func() chan<- error) {
var (
src = make(chan error)
wg sync.WaitGroup
@keks
keks / main.go
Created November 27, 2017 13:12
simulator for finding usable parameters
package main
import (
"fmt"
"github.com/agoussia/godes"
"os"
"strconv"
)
// the arrival and service are two random number generators for the uniform distribution
@keks
keks / request
Last active October 23, 2017 13:05
POST /api/v0/bootstrap/add?arg=this%2FIs%2FSo%2FInvalid%2F&stream-channels=true HTTP/1.1
User-Agent: /node-ipfs-api/14.3.5/
Host: 127.0.0.1:33765
Connection: close
Content-Length: 0
Traceback (most recent call last):
File "/home/keks/.local/share/openmedialibrary/platform_linux64/lib/python3.4/site-packages/sqlalchemy/engine/base.py", line 1073, in _execute_context
context = constructor(dialect, self, conn, *args)
File "/home/keks/.local/share/openmedialibrary/platform_linux64/lib/python3.4/site-packages/sqlalchemy/engine/default.py", line 584, in _init_compiled
param.append(processors[key](compiled_params[key]))
File "/home/keks/.local/share/openmedialibrary/platform_linux64/lib/python3.4/site-packages/sqlalchemy/sql/sqltypes.py", line 1236, in process
value = dumps(value, protocol)
File "oml/json_pickler.py", line 12, in dumps
return json.dumps(*args, **kwargs).encode()
TypeError: dumps() takes 1 positional argument but 2 positional arguments (and 1 keyword-only argument) were given
maude tool: 'maude'
checking version: 2.7. OK.
checking installation: OK.
theory SHS begin
// Function signature and definition of the equational theory E
builtins: diffie-hellman
functions: ed2cv/1, fst/1, h/1, mac/2, macv/3, pair/2, pk/1, sdec/2,
@keks
keks / halfway.log
Created January 19, 2017 20:17
Output of tamarin-prover on the halfway branch of tamarin-shs
maude tool: 'maude'
checking version: 2.7. OK.
checking installation: OK.
theory SHS begin
// Function signature and definition of the equational theory E
builtins: diffie-hellman
functions: ed2cv/1, fst/1, h/1, mac/2, macv/3, pair/2, pk/1, sdec/2,
type ResponseEmitter interface {
// closes http conn or channel
io.Closer
// Set/Return the response Error
SetError(err error, code ErrorType)
// Gets Stdout and Stderr, for writing to console without using SetOutput
Stdout() io.Writer
Stderr() io.Writer
package commands
// ...
func (cmd *Command) Call(r Request, w io.Writer) error {
// ...
res := NewResponse(r, w) // pass the writer
cmd.Run(...)
#!/bin/bash
#
# Parses DHCP options from openvpn to update resolv.conf
# To use set as 'up' and 'down' script in your openvpn *.conf:
# up /etc/openvpn/update-resolv-conf
# down /etc/openvpn/update-resolv-conf
#
# Used snippets of resolvconf script by Thomas Hood <jdthood@yahoo.co.uk>
# and Chris Hanson
# Licensed under the GNU GPL. See /usr/share/common-licenses/GPL.
@keks
keks / fetch.go
Last active August 29, 2015 14:12 — forked from cryptix/fetch.go
package main
import (
"crypto/sha1"
"fmt"
"io"
"net/http"
"os"
"strings"
"sync"