Skip to content

Instantly share code, notes, and snippets.

View roelandp's full-sized avatar
💧
💯

roelandp

💧
💯
View GitHub Profile
Verifying that +roelandp is my blockchain ID. https://onename.com/roelandp
@roelandp
roelandp / readme.md
Created December 14, 2015 19:22 — forked from max-mapper/readme.md
ffmpeg youtube live event rtmp stream from raspberry pi with raspi camera (raspivid)
  1. compile ffmpeg for arm https://github.com/fiorix/ffmpeg-arm
  2. create youtube 'live event'. get rtmp url + session id
  3. run this:
raspivid -o - -t 0 -vf -hf -fps 30 -b 6000000 | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/<SESSION>

you can tweak -b and -fps to your liking. the settings above work well for 1080p. by not specifying width or height we get the full 1920x1080 resolution from the raspi camera

@roelandp
roelandp / witnessfailover.py
Created October 24, 2016 13:04
Failover script (original by jesta) modified to use telegram to notify you.
import os
import sys
import time
from piston.steem import Steem
from pprint import pprint
from steemtools.experimental import Transactions
# Steem connection and witness information
node = os.environ['steem_node']
witness = os.environ['steem_account']

Keybase proof

I hereby claim:

  • I am roelandp on github.
  • I am roelandp (https://keybase.io/roelandp) on keybase.
  • I have a public key whose fingerprint is 6932 A56F 30AB EF02 6051 F3C2 D949 D8A4 4EB7 C1F5

To claim this, I am signing this object:

@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.

curl -H 'Host: festival.appmiral.com' -H 'Content-Type: application/json' -H 'Last-Modified: 2017-08-03T12:45:19+0000' -H 'x-protect: d32f740dbda392f0245e4feddbedae84' -H 'Accept: application/json' -H 'Accept-Language: en-us' -H 'User-Agent: SolarWeekend-2017/2015042914 CFNetwork/811.5.4 Darwin/16.7.0' --compressed 'https://festival.appmiral.com/api/v4/festivals/solarweekend/editions/solar2017/stages?maxperpage=500'
curl -H 'Host: festival.appmiral.com' -H 'Content-Type: application/json' -H 'Last-Modified: 2017-08-03T12:46:43+0000' -H 'x-protect: d32f740dbda392f0245e4feddbedae84' -H 'Accept: application/json' -H 'Accept-Language: en-us' -H 'User-Agent: SolarWeekend-2017/2015042914 CFNetwork/811.5.4 Darwin/16.7.0' --compressed 'https://festival.appmiral.com/api/v4/festivals/solarweekend/editions/solar2017/artists?maxperpage=50'
@roelandp
roelandp / serverreport.py
Created January 15, 2018 17:01
Simple Server Reporter - sharing process %, RAM %, HDD free/used space - sharing to you via Telegram Report
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import os
import requests
import psutil
servername = "IDENTIFIABLE SERVER NAME"
diskmountedon = "/"
telegram_token = "" # Create your Telegram bot at @BotFather (https://telegram.me/botfather)
telegram_id = # Get your telegram id at @MyTelegramID_bot (https://telegram.me/mytelegramid_bot)
@roelandp
roelandp / bwtoollib.py
Last active March 19, 2018 23:32
Translating bw_tool commands to python via dirty shell exec.
#!/usr/bin/env python
import subprocess
# This script runs bw_tool commands from the shell to talk with 10 relays connected over SPI (bitwizard.nl)
# this config is 1 small block with 4 relays (RPI SPI Relay) and extended over SPI with the "Big Relay" 6 relays block.
# I wanted to have a logical array of relays so this script is mainly to ease the talking to the 10 arrays
# the 4 + 6 relays are now in 1 List from 0 to 9 mapped out
# now you can do stuff like toggleRelay(0,1) which turns relay 0 to 1 (on) (regardless of its state). or toggleRelay(5,0) to turn relay 5 to 0 (off).
# additionally the script offers a feature to -R (read) the current state (on or off) of the relay per index(0-9) "isRelayOn(6)" as a Boolean (True = on) (False = off)
# This script does no error checking and assumes a working setup. Should be extended with more error checking to be noob/foolproof most probs :)
@roelandp
roelandp / part-of-python3-script.py
Created May 1, 2018 05:51
New exchanges (Binance, Huobi, Upbit) (Steem-BTC pairs) added for Steem Pricefeed monitoring based on Clayop's pricefeed script. -> https://github.com/clayop/steemfeed
# 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
@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>