allow_anonymous = on
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import ipaddress | |
def get_endpoints(): | |
endpoints = [] | |
response = requests.get("https://raw.githubusercontent.com/CityOfZion/neo-mon/master/docs/assets/mainnet.json") | |
response.raise_for_status() | |
if response.status_code == 200: | |
results = response.json() | |
for site in results['sites']: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//= require babel/polyfill | |
const network = 'PrivateNet' | |
const scriptHash = '58e7c597e246a11177580fdda62e0881b8e7e3c0' | |
class Account { | |
constructor(address, name) { | |
this.address = address | |
this.name = name | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Neo script to little-endian BigInteger | |
#!/usr/local/env python3 | |
import binascii | |
script="011fc56b6a00527ac46a51527ac468164e656f2e53746f726167652e476574436f6e74657874616a52527ac46a00c30361646487646e0006616464696e67680f4e656f2e52756e74696d652e4c6f676a52c36a51c300c37c680f4e656f2e53746f726167652e476574616a53527ac46a53c36a51c351c3936a54527ac46a52c36a51c300c36a54c35272680f4e656f2e53746f726167652e507574616a54c36c7566616a00c30672656d6f7665876454006a52c36a51c300c37c680f4e656f2e53746f726167652e476574616a53527ac46a52c36a51c300c36a53c36a51c351c3945272680f4e656f2e53746f726167652e507574616a53c36a51c351c3946c7566616a00c30762616c616e6365876421006a52c36a51c300c37c680f4e656f2e53746f726167652e476574616c7566616a00c3076d69677261746587642401174d696772617465206f7065726174696f6e207374617274680f4e656f2e52756e74696d652e4c6f670207106a55527ac401056a56527ac4516a57527ac4136d6967726174656420636f6e747261637420336a58527ac403302e336a59527ac40b6c6f63616c68756d616e336a5a527ac40d6e657840656d61696c2e636f6d6a5b527ac40d74657374206d6967726174653 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let url = "http://neo-privnet:30333"; | |
const client = Neon.create.rpcClient(url, '2.3.2'); | |
let id = this.get('model').id; | |
console.log(id); | |
client.getRawTransaction(id) | |
.then((res) => { | |
console.log(res) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Start docker (Repo: https://github.com/slipo/neo-scan-docker) | |
docker-compose up | |
# Start Neo prompt | |
np-prompt -p -v | |
# Open Wallet | |
open wallet neo-privnet.wallet | |
# Export WIF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from network import LoRa | |
import pycom | |
import socket | |
import time | |
import binascii | |
import json | |
from network import WLAN | |
from network import Bluetooth | |
bt = Bluetooth() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For monitoring Network Manager connection and restart it on a dropped connection (eth/wifi). Make sure to specify the right interface below (eth0, wlan0...) | |
#/etc/init/reconnect.conf | |
start on started network-manager | |
stop on runlevel [016] | |
script | |
while true; do | |
if ifconfig eth0 | grep -q "inet addr:"; then | |
# echo "all ok!" |
NewerOlder