Skip to content

Instantly share code, notes, and snippets.

@davout
davout / README.md
Created July 3, 2015 07:14
Watchy audit framework description

Watchy, audit and monitoring framework

Usage

After installing the gem you must configure the framework and tell it what it should monitor and how it should audit it.

Example :

require 'watchy'
@davout
davout / gist:edb4db0315dc417fa78d
Created May 26, 2014 11:13
Persistent OAuth2 token client
#
# How to use :
# bc_client = AutoRefreshToken.new
# bc_client.post('/api/v1/user/orders', params.to_json)
#
require 'oauth2'
class AutoRefreshToken
#!/usr/bin/env ruby
require 'securerandom'
require 'bitcoin'
require 'digest'
LIST = './wordlist.txt'
ROLLS_PER_WORD = 5
DICE_FACES = 6
WORDS_PER_PHRASE = 12
.row.alerts
.span12
- unless flash.blank?
- [:notice, :alert, :warning, :error].select{ |type| not flash[type].blank? }.each do |type|
.flash
%div{:class => "alert alert-#{type}"}
%a.close{ 'data-dismiss' => 'alert' }= '&times'.html_safe
!= flash[type]

API v1 Documentation

This document describes the Bitcoin-Central.net v1 API.

General API description

Authentication

Authentication is currently done as previously with HTTP Basic. The regular username and password should be used. This is deprecated and will soon be replaced with OAuth2.

API v1 Documentation

This document describes the Bitcoin-Central.net v1 API.

General API description

Authentication

@davout
davout / template.erb
Created August 12, 2011 15:33
Template
<h1>Private key for : <%= @address %></h1>
<p>Generated at : <%= @now %></p>
<h2>Block Explorer</h2>
<img src="bbe_<%= @address %>.png">
<h2>Private key : <%= @private_key %></h2>
<img src="<%= @private_key %>.png">
@davout
davout / generate.rb
Created August 11, 2011 13:08
Extract bitcoin address and private key from EC PEM certificate to nice and sweet QR codes
#!/usr/bin/ruby
require 'erb'
require 'digest'
require 'date'
B58Chars = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
B58Digits = B58Chars.split('')
B58Base = B58Chars.length