Skip to content

Instantly share code, notes, and snippets.


Christoph Klocker corck

View GitHub Profile
corck /
Created Oct 24, 2019 — forked from ixje/
find connected NEO nodes from coz monitor RPC list
import requests
import ipaddress
def get_endpoints():
endpoints = []
response = requests.get("")
if response.status_code == 200:
results = response.json()
for site in results['sites']:
corck / invoke.js.es6
Created Jun 11, 2019
Neo dAPI example to invoke a method with verification
View invoke.js.es6
//= require babel/polyfill
const network = 'PrivateNet'
const scriptHash = '58e7c597e246a11177580fdda62e0881b8e7e3c0'
class Account {
constructor(address, name) {
this.address = address = name
corck /
Created Jun 11, 2019
neo verfication example
from boa.interop.Neo.Runtime import GetTrigger,CheckWitness
from boa.interop.Neo.Storage import Get,Put,Delete,GetContext
from boa.interop.Neo.TriggerType import Application, Verification
def Main(operation, addr, value):
print("Running Sample v4")
trigger = GetTrigger()
# This determines that the SC is running in Verification mode
# Neo script to little-endian BigInteger
#!/usr/local/env python3
import binascii
View neon-js-rpc-call
let url = "http://neo-privnet:30333";
const client = Neon.create.rpcClient(url, '2.3.2');
let id = this.get('model').id;
.then((res) => {
corck /
Created Jul 11, 2018
Get WIF from Neo Test Wallet
# Start docker (Repo:
docker-compose up
# Start Neo prompt
np-prompt -p -v
# Open Wallet
open wallet neo-privnet.wallet
# Export WIF
corck /
Last active Jun 28, 2018
Lora Lopy wearic smart textile developer kit test. switch on and off leds through Lopy extension board.
from network import LoRa
import pycom
import socket
import time
import binascii
import json
from network import WLAN
from network import Bluetooth
bt = Bluetooth()
View gist:22bb291cc9a9fa6dec673bca2060892b


Allow anyonymous

allow_anonymous = on

corck / gist:d4c63e3908548963ce2e58b45d9976e2
Last active Feb 6, 2017
Restart Networkmanager on connection reset, restart VPN after network manager restart
View gist:d4c63e3908548963ce2e58b45d9976e2
For monitoring Network Manager connection and restart it on a dropped connection (eth/wifi). Make sure to specify the right interface below (eth0, wlan0...)
start on started network-manager
stop on runlevel [016]
while true; do
if ifconfig eth0 | grep -q "inet addr:"; then
# echo "all ok!"
corck / gist:baf400b0598fc2c27e956af9b59ed6d4
Last active Jan 13, 2017
Ruby thingsnetwork example mqtt script
View gist:baf400b0598fc2c27e956af9b59ed6d4
require 'mqtt'
require 'base64'
require 'json'
app_id = APP_ID
access_key = ACCESS_KEY
dev_id = DEV_ID
region = eu
client = MQTT::Client.connect("mqtt://#{app_id}:#{access_key}@#{region}")
You can’t perform that action at this time.