This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######NOTE####### | |
#This script was written in python 2.7... no guarantees it works on python 3 without modification. | |
import lmdb | |
from pyblake2 import blake2b | |
import matplotlib.pyplot as plt | |
#CHANGE THIS TO YOUR DATABASE LOCATION (usually /home/user/RaiBlocks/) | |
#ALSO!! Python doesn't see the database unless it has extension .mdb | |
#however your nano-node/wallet won't see it unless it stays named as .ldb | |
#I suggest creating a symlink as follows: ln -s /PATH/TO/YOUR/DATABASE/data.ldb /PATH/TO/YOUR/DATABASE/data.mdb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
# This is how I upload my new Sol Trader builds (http://soltrader.net) | |
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
S3KEY="my aws key" | |
S3SECRET="my aws secret" # pass these in | |
function putS3 | |
{ | |
path=$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<xmp id="README" theme="united" style="display:none;"> | |
</xmp> | |
<script type="text/javascript"> | |
var req = new XMLHttpRequest(); | |
req.onload = function() { | |
var xmpNode = document.getElementById('README'); | |
xmpNode.appendChild(document.createTextNode(this.responseText)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// polyfill window.getMatchedCSSRules() in FireFox 6+ | |
if ( typeof window.getMatchedCSSRules !== 'function' ) { | |
var ELEMENT_RE = /[\w-]+/g, | |
ID_RE = /#[\w-]+/g, | |
CLASS_RE = /\.[\w-]+/g, | |
ATTR_RE = /\[[^\]]+\]/g, | |
// :not() pseudo-class does not add to specificity, but its content does as if it was outside it | |
PSEUDO_CLASSES_RE = /\:(?!not)[\w-]+(\(.*\))?/g, | |
PSEUDO_ELEMENTS_RE = /\:\:?(after|before|first-letter|first-line|selection)/g; | |
// convert an array-like object to array |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
this.MysqlBinlogTailer = MysqlBinlogTailer; | |
var EventEmitter = require('events').EventEmitter; | |
var fs = require('fs'); | |
var path = require('path'); | |
/** | |
* Tails a Mysql binlog and emits an event for every query executed. | |
*/ |