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
s='';i=0; $('tr:gt(3)').each(function() { rows = ($(this).find('td')); s+=( '<#t_' + i++ + '> a <https://w3id.org/commerce#Transfer> ; <http://purl.org/dc/terms/created> "' + rows[1].textContent + '" ; <http://xmlns.com/ns/foaf/0.1/name> "' + rows[2].textContent + '" ; <https://w3id.org/commerce#amount> ' + rows[3].textContent + ' ; <http://www.w3.org/2000/01/rdf-schema#comment> "' + rows[4].textContent + '" .\n') ; }) ; console.log(s); |
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
bitcoind --daemon | |
wget http://stedolan.github.io/jq/download/linux64/jq | |
export BLOCK=00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048 ; for ((;;)) do BLOCK=`bitcoind getblock $BLOCK | ./jq -r '.nextblockhash'` ; echo $BLOCK ; done |
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
var g = '020000000000000000000000000000000000000000000000000000000000000000000000da1adfa2ed7ad4d5404e738a0b6edb6146784ab23dbaef7d9336944051049f4e01e82f531d00ffff76dc2686' | |
[ g.substring(0,8), g.substring(8,72) , g.substring(72,136), g.substring(136,144), g.substring(144,152), g.substring(152, 160) ] | |
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
var bitcore = require('bitcore'); | |
require('buffertools').extend(); | |
var Block = bitcore.Block; | |
var BinaryParser = bitcore.BinaryParser; | |
var b = new Block(); | |
var buf = new Buffer(block); | |
buf = buf.fromHex(); | |
var p = new BinaryParser(buf); | |
b.parse(p); |
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
var https = require('https'); | |
var fs = require("fs"); | |
var options = { | |
host: 'domain_name', | |
port: 443, | |
path: 'path_to_file', | |
method: 'PUT', | |
key: fs.readFileSync("path_to_key.key"), | |
cert: fs.readFileSync("path_to_cert.crt"), |
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
var bitcore = require('bitcore'); | |
// loop here | |
var password = 'loop here'; | |
var privateKey = bitcore.util.sha256(password); | |
var key = new bitcore.Key(); | |
key.private = privateKey; |
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> | |
<head> | |
<title>User Registration</title> | |
<script src="bitcorelatest.js"></script> | |
<script> | |
// Derive given private key index.. | |
function get_bip32_key(path) { |
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
# init | |
#LDPC="https://localhost:8888/test/put/" | |
#LDPC="https://melvin.rww.io/workspace/blog/ch5/" | |
LDPC=$(git config webid.weblog) | |
KEYFILE=$(git config webid.keyfile) | |
WEBID=$(git config user.webid) | |
NAME=$(git config user.name) | |
DEPICTION=$(git config user.depiction) | |
USER_AGENT='User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/39.0.2171.65 Chrome/39.0.2171.65 Safari/537.36' |
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
var https = require('https'); | |
var fs = require('fs'); | |
var roomId = process.env.ROOM_ID; | |
var token = process.env.TOKEN; | |
var heartbeat = " \n"; | |
console.log('logging room : ' + roomId); | |
var gitter = { |
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
// items | |
if (!todo.items) todo.items = []; | |
for (var i=0; i<todo.items.length; i++) { | |
var id = todo.items[i].id.indexOf('http') ? '#' + todo.items[i].id : todo.items[i].id; | |
str += '\n'+ '<' + id + '> a <http://dig.csail.mit.edu/2010/issues/track#Task> .'; | |
str += '\n'+ '<' + id + '> <http://purl.org/dc/terms/description> "'+ escape(todo.items[i].text) +'".'; | |
str += '\n'+ '<' + id + '> <http://www.w3.org/2002/12/cal/ical#completed> '+ todo.items[i].complete +'.'; | |
str += '\n'+ '<' + id + '> <https://taskify.org/ns/task#urgent> '+ todo.items[i].urgent +'.'; | |
str += '\n'+ '<' + id + '> <https://taskify.org/ns/task#important> '+ todo.items[i].important +'.'; | |
if (!todo.items[i].tags) todo.items[i].tags = []; |