Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View philippgille's full-sized avatar

Philipp Gillé philippgille

View GitHub Profile
@haproxytechblog
haproxytechblog / haproxy-config-2-0.cfg
Created June 13, 2019 20:41
HAProxy 2.0 configuration
#
# This is the ultimate HAProxy 2.0 "Getting Started" config
# It demonstrates many of the features available which are now available
# While you may not need all of these things, this can serve
# as a reference for your own configurations.
#
# Have questions? Check out our community Slack:
# https://slack.haproxy.org/
#
security = function dom_load_security():void {
const scripts:HTMLCollectionOf<HTMLScriptElement> = document.getElementsByTagName("script"),
exclusions:string[] = [
"", //put relative addresses for your authorized scripts here
],
len:number = scripts.length,
exlen:number = exclusions.length;
let a:number = 0,
b:number = 0,
src:string = "";
@fernandonm
fernandonm / bitcoin_derivatives.md
Last active May 29, 2019 08:03
Trust-minimized derivatives

Trust-minimized derivatives

Options contracts can be implemented as trust-minimized smart contracts using Bitcoin script. These contracts don't require oracles feeding the price into the blockchain or any other trusted third party. Recipients will only trust miners to mine (and not reverse) transactions paying a reasonable feerate, securing their payouts.

The underlier of these derivatives can be any digital asset available on a blockchain that can do HLTCs.

Call options

The buyer of an American-style call binary option pays a premium (eg: 0.1 BTC) for <seller secret> wich gives the right to buy Q units (quantity) of the underlying asset (100 LTC) at a specified strike price (0.016 BTC per LTC) at any time until the expiration date.

@paulmach
paulmach / serve.go
Last active March 28, 2024 15:31
Simple Static File Server in Go
/*
Serve is a very simple static file server in go
Usage:
-p="8100": port to serve on
-d=".": the directory of static files to host
Navigating to http://localhost:8100 will display the index.html or directory
listing file.
*/
package main
@mikeminutillo
mikeminutillo / Config.cs
Created April 15, 2011 13:40
For AppHarbor use, this will use the config file by default but fall back to the corresponding environment variable if you use the value {ENV}
public interface IConfig
{
string Get(string key);
}
public class Config : IConfig
{
public string Get(string key)
{
var fromConfig = ConfigurationManager.AppSettings[key];