Skip to content

Instantly share code, notes, and snippets.

@weilu
weilu / README.md
Last active October 9, 2020 15:55
World Clock widget for dashing

World Clock

screen shot 2013-11-28 at 12 29 37 pm

Description

A simple widget that's capable of displaying time for multiple locations around the world. In our company(neo), we use it to display time in different offices.

Installation

# Raw transaction API example work-through
# Send coins to a 2-of-3 multisig, then spend them.
#
# For this example, I'm using these three keypairs (public/private)
# 0491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f86 / 5JaTXbAUmfPYZFRwrYaALK48fN6sFJp4rHqq2QSXs8ucfpE4yQU
# 04865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a986818a7cb624532f062c1d1f8722084861c5c3291ccffef4ec6874 / 5Jb7fCeh1Wtm4yBBg3q3XbT6B525i17kVhy3vMC9AqfR6FH2qGk
# 048d2455d2403e08708fc1f556002f1b6cd83f992d085097f9974ab08a28838f07896fbab08f39495e15fa6fad6edbfb1e754e35fa1c7844c41f322a1863d46213 / 5JFjmGo5Fww9p8gvx48qBYDJNAzR9pmH5S389axMtDyPT8ddqmw
# First: combine the three keys into a multisig address:
./bitcoind createmultisig 2 '["0491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f86","04865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a9
@jjulian
jjulian / betascape3.sample.csv
Created September 23, 2012 21:48
Transform wireshark csv packet data into a Rickshaw graph of the most chatty ip addresses. Betascape 2012 example.
No.,"Time","Source","Destination","Protocol","Length","Info"
1,"0.000000000","10.10.83.34","255.255.255.255","UDP","82","Source
2,"0.414041000","10.10.83.236","10.10.83.255","NBNS","92","Name
3,"1.102041000","10.10.82.121","255.255.255.255","UDP","82","Source
4,"1.165016000","10.10.83.236","10.10.83.255","NBNS","92","Name
5,"1.860212000","10.10.81.190","255.255.255.255","DB-LSP-DISC","163","Dropbox
6,"1.862162000","10.10.81.190","10.10.83.255","DB-LSP-DISC","163","Dropbox
7,"1.914055000","10.10.83.236","10.10.83.255","NBNS","92","Name
8,"2.727106000","Cisco_44:41:c8","Broadcast","ARP","60","Who
9,"3.494374000","10.10.80.109","255.255.255.255","DB-LSP-DISC","313","Dropbox
@etotheipi
etotheipi / armory_escrow.md
Created April 4, 2012 21:52
Buyer-Seller Escrow, with or without third-party

Buyer-Seller Escrow, with or without third-party

  • Author: Alan Reiner (Armory)
  • Orig Date: 04 April, 2012 First Draft: Sorting out ideas, and event sequences, handling details like who signs what when and where change outputs and fees fit into the equation.

Example Transaction

Here's an example of Alice and Bob setting up the transaction. Bob posts an item on craigslist, knowing that unknown, untrusted Alice will try to buy it. In this case, Bob is the seller and will set the "Risk Deposit" (could also be "Escrow Deposit"). This can be negotiated by the buyer, but I expect that something like 15-25% would be standard and not a point of contention. Remember, buyer does not trust seller, and vice versa.

@nu7hatch
nu7hatch / spec_helper.rb
Created October 17, 2010 21:46
Testing standard input with RSpec
...
module Helpers
# Replace standard input with faked one StringIO.
def fake_stdin(*args)
begin
$stdin = StringIO.new
$stdin.puts(args.shift) until args.empty?
$stdin.rewind
yield
@remy
remy / gist:350433
Created March 31, 2010 14:58
Storage polyfill
if (typeof window.localStorage == 'undefined' || typeof window.sessionStorage == 'undefined') (function () {
var Storage = function (type) {
function createCookie(name, value, days) {
var date, expires;
if (days) {
date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
expires = "; expires="+date.toGMTString();