Skip to content

Instantly share code, notes, and snippets.

View corck's full-sized avatar

Christoph Klocker corck

View GitHub Profile
corck /
Created June 9, 2021 15:56
Chubbies Generation Code
The MIT License
Copyright (c) 2021 Chubbies NFT
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
corck /
Created October 24, 2019 07:22
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 June 11, 2019 09:34
Neo dAPI example to invoke a method with verification
//= require babel/polyfill
const network = 'PrivateNet'
const scriptHash = '58e7c597e246a11177580fdda62e0881b8e7e3c0'
class Account {
constructor(address, name) {
this.address = address = name
corck /
Created June 11, 2019 09:31
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
corck / neon-js-rpc-call
Created July 16, 2018 15:04
Neon 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 July 11, 2018 07:39
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 June 28, 2018 22:10
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()


Allow anyonymous

allow_anonymous = on

corck / gist:d4c63e3908548963ce2e58b45d9976e2
Last active May 6, 2022 21:20
Restart Networkmanager on connection reset, restart VPN after network manager restart
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!"