Skip to content

Instantly share code, notes, and snippets.

@g-p-g
g-p-g / letsencrypt.md
Last active March 9, 2016 15:00
Using letsencrypt

Download

git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt

Generate SSL certificate

@g-p-g
g-p-g / sjcl_simple
Created June 17, 2015 01:37
SJCL encrypt / decrypt in Python
import os
from base64 import b64decode, b64encode
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
from cryptography.hazmat.backends import default_backend
_BACKEND = default_backend()
@g-p-g
g-p-g / ticker.html
Created March 11, 2015 15:26
Coinapult sockjs ticker
<html>
<head>
<script src="https://cdn.jsdelivr.net/sockjs/0.3.4/sockjs.min.js"></script>
</head>
<body>
<p>Index: <span id="index">-</span></p>
<p>Last Update: <span id="when">never</span></p>
<script>
var sock = new SockJS('https://stream.coinapult.com:8123');
import sys
from string import maketrans
trans = maketrans(
'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'22233344455566677778889999'
)
num = int(sys.stdin.next())
for line in sys.stdin:
@g-p-g
g-p-g / coinapult_wallet.json
Created January 14, 2015 23:38
json config for setting up the Coinapult plugin for Lamassu
{
"exchanges": {
"plugins": {
"current": {"transfer": "coinapult"},
"settings": {"coinapult": {}}
}
}
}
@g-p-g
g-p-g / coinapult_lamassu.patch
Created January 11, 2015 13:59
Patch for lamassu-admin to list the Coinapult plugin
diff --git a/client/code/app/Models/User.js b/client/code/app/Models/User.js
index 2caaeb3..f003bf2 100644
--- a/client/code/app/Models/User.js
+++ b/client/code/app/Models/User.js
@@ -4,7 +4,7 @@ var PriceData = Backbone.Model.extend({ //this model keeps a current record of p
var self = this
- self.sources = ['bitstamp', 'bitpay', 'coindesk', 'bitcoinaverage']
+ self.sources = ['bitstamp', 'bitpay', 'coindesk', 'bitcoinaverage', 'coinapult']