Skip to content

Instantly share code, notes, and snippets.

@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@supertestnet
supertestnet / burrow.md
Last active April 18, 2024 11:03
Burrow: a federated coinpool built on hedgehog channels

Burrow

Burrow is a proposal for a federated coinpool on top of hedgehog channels. The coinpool can have a bunch of cool properties:

  • a single-honest-party assumption, so the federation can't rug any user unless the keyholders in the federation are all scoundrels

  • users can onboard into the pool without an on-chain transaction (e.g. maybe you send in coins via lightning, or maybe another user gives you your first coins from within the pool)

  • every onboarded user gets their own wallet interface with their own personal balance and Send/Receive buttons

@karlgluck
karlgluck / Hash Ladders for Shorter Lamport Signatures.md
Last active March 31, 2024 17:53
I describe a method for making Lamport signatures take up less space. I haven't seen anyone use hash chains this way before, so I think it's pretty cool.

What's this all about?

Digital cryptography! This is a subject I've been interested in since taking a class with Prof. Fred Schneider back in college. Articles pop up on Hacker News fairly often that pique my interest and this technique is the result of one of them.

Specifically, this is about Lamport signatures. There are many signature algorithms (ECDSA and RSA are the most commonly used) but Lamport signatures are unique because they are formed using a hash function. Many cryptographers believe that this makes them resistant to attacks made possible by quantum computers.

How does a Lamport Signature work?

@Yawning
Yawning / orhttp_example.go
Created April 29, 2015 14:41
How to dispatch HTTP requests via Tor in Go.
// To the extent possible under law, the Yawning Angel has waived all copyright
// and related or neighboring rights to orhttp_example, using the creative
// commons "cc0" public domain dedication. See LICENSE or
// <http://creativecommons.org/publicdomain/zero/1.0/> for full details.
package main
import (
// Things needed by the actual interface.
"golang.org/x/net/proxy"
/*
* Copyright (C) 2016 Alexander Nasonov.
* (WINT_R macro) Copyright (C) 2005-2016 Mike Pall.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
@mloskot
mloskot / boost_property_tree_json_array.cpp
Created December 22, 2011 11:11
Simple example of parsing and consuming JSON array with boost::property_tree
#ifdef _MSC_VER
#include <boost/config/compiler/visualc.hpp>
#endif
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <boost/foreach.hpp>
#include <cassert>
#include <exception>
#include <iostream>
#include <sstream>
@DavidVorick
DavidVorick / renterprop.md
Last active October 11, 2017 01:27
Renter Propsal - First 15 Sprints

This document is a proposed roadmap for the renter. It contains a lot of long term code projects, and a path to get there incrementally. It is our goal to never refactor more than a small part of the code at a time, and to divide the code cleanly so that multiple people can easily work on the code in parallel.

Sprint 1: Distributed Renter Abstraction

An important feature for moving towards large enterprise customers is a distribtuted renter, where multiple renters use the same filesystem and the same set of contracts. This allows larger systems to be set up with multiple nodes,

@1aN0rmus
1aN0rmus / KippoUsers.txt
Created July 21, 2014 14:31
List of unique usernames attempted against my Kippo instance
root
a
b
user1
oracle
postgres
test
kippo
nagios
zabbix
local getlocal, setlocal = debug.getlocal, debug.setlocal
local function from_err(k, msg)
local info = debug.getinfo(3)
io.stderr:write(string.format(
"%s:%s:%d: local variable '%s' %s in import block\n",
info.source:sub(2),info.name,info.currentline,k,msg))
os.exit()
end