Skip to content

Instantly share code, notes, and snippets.

Alexander Leishman leishman

Block or report user

Report or block leishman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@achow101
achow101 / bitcoin-core-hww.md
Last active May 6, 2019
How to Use Bitcoin Core with Hardware Wallets
View bitcoin-core-hww.md

Using Bitcoin Core with Hardware Wallets

This approach is fairly manual, requires the command line, and requires a patched version of Bitcoin Core.

Note: For this guide, code lines prefixed with $ means that the command is typed in the terminal. Lines without $ are output of the commands.

Disclaimer

I am not liable for any coins that may be lost through this method. The software mentioned may have bugs. Use at your own risk.

@fernandonm
fernandonm / bitcoin_derivatives.md
Last active May 29, 2019
Trust-minimized derivatives
View bitcoin_derivatives.md

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.

@maxivak
maxivak / 00.md
Last active Sep 16, 2019
Sending emails with ActionMailer and Sidekiq
View 00.md

Sending emails with ActionMailer and Sidekiq

Send email asynchroniously using Sidekiq.

ActionMailer

Create your mailer us usual:

@spoike
spoike / webapi_example.js
Last active May 12, 2017
Simple WebAPI example
View webapi_example.js
var PostsApi = require('webapi/posts'),
// assuming the api object from the jsbin snippet
Reflux = require('reflux');
var PostActions = createActions(["load", "loadError"]);
// load action is invoked either from:
// * top most component's componentDidMount
// function in your application, or
// * window.onLoad
// I prefer the first strategy because that'll
@gavinandresen
gavinandresen / BlockPropagation.md
Last active Aug 16, 2019
O(1) block propagation
View BlockPropagation.md

O(1) Block Propagation

The problem

Bitcoin miners want their newly-found blocks to propagate across the network as quickly as possible, because every millisecond of delay increases the chances that another block, found at about the same time, wins the "block race."

View web-of-trust.md

A pseudonymous trust system for a decentralized anonymous marketplace

Dionysis Zindros, National Technical University of Athens dionyziz@gmail.com

Keywords

pseudonymous anonymous web-of-trust identity trust bitcoin namecoin proof-of-burn timelock decentralized anonymous marketplace openbazaar

Abstract

@rthbound
rthbound / animated_moon.rb
Last active Aug 29, 2015
Make a gif of the Moon as seen from Earth for one lunar year, starting now - http://gfycat.com/SilverPositiveBluet
View animated_moon.rb
require "usno/imagery"
require "open-uri"
require "RMagick"
include Magick
def animate(n,f)
i=0
time = Time.now
@julionc
julionc / 00.howto_install_phantomjs.md
Last active Sep 10, 2019
How to install PhantomJS on Debian/Ubuntu
View 00.howto_install_phantomjs.md

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@hmans
hmans / application.html.slim
Last active Dec 14, 2018
Application layout for Rails (4 and 5), Slim style.
View application.html.slim
doctype html
html
head
title My App
meta name="viewport" content="width=device-width, initial-scale=1.0"
= stylesheet_link_tag "application", media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag "application", 'data-turbolinks-track' => true
= csrf_meta_tags
body
@plentz
plentz / nginx.conf
Last active Sep 14, 2019
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
You can’t perform that action at this time.