Skip to content

Instantly share code, notes, and snippets.

View roelandp's full-sized avatar
💧
💯

roelandp

💧
💯
View GitHub Profile
@roelandp
roelandp / steemtrain.js
Last active June 2, 2022 16:04
Steam Train powered by the Hive Chain!
// this was really a quick hack :)
const PoweredUP = require("node-poweredup");
const poweredUP = new PoweredUP.PoweredUP();
var dsteem = require('dsteem')
message('fireing up this script');
function message(msg){
@roelandp
roelandp / colordabrand.html
Last active April 14, 2020 10:14
Color Da Brand as was hosted on Hive.io prior to launch for coloring
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Color Hive Hextacular Yourself</title>
<meta name="description" content="SoonTM"></meta>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"></meta>
<meta name="author" content="bzzz"></meta>
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"></link>
@roelandp
roelandp / claimaccount.py
Created April 3, 2020 15:02
code for Account Claiming on Hive / Steem
#!/usr/bin/python
from __future__ import division
from beem import Steem
from beem.account import Account
from beem.rc import RC
import time
import config
from beem.constants import state_object_size_info, resource_execution_time, EXEC_FOLLOW_CUSTOM_OP_SCALE
from beem.nodelist import NodeList
@roelandp
roelandp / steemecc.js
Created August 2, 2019 10:02
Steem-JS' ECC as CommonJS standalone bundle. - Makes all features (minus utils) available via window.steemecc. see origin: https://github.com/steemit/steem-js/tree/master/src/auth/ecc - simply: "browserify index.js -t [babelify] --standalone steemecc > steemecc.js"
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.steemecc = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
(function (global){
'use strict';
var objectAssign = require('object-assign');
// compare and isBuffer taken from https://github.com/feross/buffer/blob/680e
var noble = require('noble-mac');
const control_service = "7d8f60dda0684320a05ffcb8c60d86bc";
const battery_service = "180f";
const state_characteristic = "88d3cea890bf40acae8d4ba145d6b009"
const speed_characteristic = "7653f4cc08594387a35789dfd4593a3c";
const mode_characteristic = "d49d811f8acc4bd0b020b64b26d0b038";
const battery_characteristic = "2a19";
@roelandp
roelandp / witness-in-out.py
Created December 26, 2018 15:00
Alert Telegram bot for once you become active witness on bitshares (run as crontab) (will ping everytime, dumb script, could use some STATE for saving - e.g. pickle) Need to add telegram_token & telegram_id and update "myname" to yours
#!/usr/bin/env python3
from bitshares import BitShares
from bitshares.blockchain import Blockchain
from bitshares.account import Account
from bitshares.instance import set_shared_bitshares_instance
from bitshares.witness import Witness
import requests
websocket = "wss://btsws.roelandp.nl/ws"
@roelandp
roelandp / sshloop.sh
Created November 29, 2018 11:53
Bash - looping over .ssh/config and execute traceroute which stops after 25 seconds. Could be enhanced by highlighting traceroute results for certain greps.
#stop script by: CTRL C and also "pkill traceroute"
while IFS="" read -r p || [ -n "$p" ]
do
if [[ "$p" =~ ^Host.* ]];
then
printf '%s\n' "$p"
if [[ "$p" =~ ^Hostname.* ]];
then
traceroute "${p/Hostname /}" &
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@roelandp
roelandp / testje.html
Created June 25, 2018 09:25
Potvisfontein
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Testje Walvisfontein</title>
<meta name="description" content="Testje Walvisfontein">
<meta name="author" content="roelandp">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
@roelandp
roelandp / readme.md
Last active June 14, 2018 07:44
Mining on Decent - Read this first.

MINING Witnessing blocks for Decent

Decent is a network for publishing content and runs on the Graphene based software. Graphene has many advantages, such as very low blocktimes which result in nearly instantantious transfers and high TX throughput.

Graphene software is based on the DPOS model and not on the Proof-of-Work model. There is NO need for heavy computing power to calculate algorithms to find solutions and create new blocks and get rewarded.

It is not a environmental unfriendly game of 'who has the biggest CPU/GPU'.

Instead it is about having stability through active miners witnesses who run copies of the ./decentd software on their dedicated servers and make sure transactions on the network are pushed in blocks and verified and signed off and pushed into the chain.