Skip to content

Instantly share code, notes, and snippets.

Avatar
💧
💯

roelandp

💧
💯
View GitHub Profile
@roelandp
roelandp / colordabrand.html
Last active Apr 14, 2020
Color Da Brand as was hosted on Hive.io prior to launch for coloring
View colordabrand.html
<!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 Apr 3, 2020
code for Account Claiming on Hive / Steem
View claimaccount.py
#!/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 Aug 2, 2019
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"
View 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
View baby-rocking.js
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 / steemtrain.js
Last active Apr 21, 2020
Steam Train powered by the Hive Chain!
View steemtrain.js
// 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 / witness-in-out.py
Created Dec 26, 2018
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
View witness-in-out.py
#!/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 Nov 29, 2018
Bash - looping over .ssh/config and execute traceroute which stops after 25 seconds. Could be enhanced by highlighting traceroute results for certain greps.
View sshloop.sh
#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 /}" &
View steemfest.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View testje.html
<!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 / part-of-python3-script.py
Created May 1, 2018
New exchanges (Binance, Huobi, Upbit) (Steem-BTC pairs) added for Steem Pricefeed monitoring based on Clayop's pricefeed script. -> https://github.com/clayop/steemfeed
View part-of-python3-script.py
# I'm using a (heavily) altered pricefeed script based on Clayop's (I use alternative publishing method mainly)
# Clayop's pricefeed script. -> https://github.com/clayop/steemfeed
# What I particularly like about the script is the live-trading monitoring, reflecting actually volumes as they happen in realtime.
# I've Written new API parsers for (recent) new exchanges (Binance, Huobi, Upbit)
# I think you can paste them inside Clayop's script (he has also added weight factors in the meantime) but volume is also a weight metric imho
# Or use them to get inspired in adding them to your own scripts.
# @roelandp