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
#!/bin/bash | |
ADDRESS="$1" | |
TOTAL=$(curl -s -I "https://nodes.lto.network/index/transactions/addresses/$ADDRESS" | grep x-total | awk '{printf "%d",$2}') | |
seq -w 00000 100 $TOTAL | xargs -P 10 -I'{}' curl -s "https://nodes.lto.network/index/transactions/addresses/$ADDRESS?limit=100&offset={}" -o "$ADDRESS.{}.json" | |
jq -s add $ADDRESS.*.json > "$ADDRESS.json" | |
rm $ADDRESS.*.json |
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
<?php | |
/** | |
* Generate package.xml for pecl extensions. | |
* Works for new and existing extensions. | |
* | |
* Add it to `Makefile.frag` | |
* package.xml: php_$(PHP_PECL_EXTENSION).h | |
* $(PHP_EXECUTABLE) build-packagexml.php | |
* |
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
#!/bin/bash | |
set -e | |
SERVICE="lto" # Change to "lto-testnet" for testnet | |
if [ -z "$1" ]; then | |
echo "USAGE $0 VERSION" >&2 | |
exit 1 | |
fi |
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
#!/bin/bash | |
if [ -z "$1" ]; then | |
echo "USAGE: $0 RECIPIENT" >&2 | |
exit 1 | |
fi | |
RECIPIENT="$1" | |
WALLET_ADDRESS=$(curl -sS http://localhost:6869/wallet/addresses | jq -r '[0]') |
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
#!/bin/bash | |
ADDRESS=$1 | |
MAX_HEIGHT=$(curl -sS http://testnet.lto.network/blocks/height | jq '.height') | |
MIN_HEIGHT=$((MAX_HEIGHT - 1999)) | |
curl -sS "https://testnet.lto.network/addresses/balance/history/$ADDRESS" | jq -r '.[] | (.height|tostring) + "," + (.balance|tostring)' > balance.csv | |
BLOCKS=$(for ((HEIGHT=MIN_HEIGHT; HEIGHT<MAX_HEIGHT; HEIGHT=HEIGHT+100)); do curl -sS "http://testnet.lto.network/blocks/address/$ADDRESS/$HEIGHT/$((HEIGHT + 99))" | jq -r '.[].height'; done) |
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
#!/bin/bash | |
ALBUM=$1 | |
mkdir -p "$ALBUM/original" "$ALBUM/new" | |
aws s3 ls "s3://fiestainfo-old-images/albums/$ALBUM/" | awk '{for(i=4; i<=NF; ++i) printf "%s ", $i; print ""}' | grep -v '.DS_Store' > "$ALBUM/list" | |
function resize_image { | |
IMAGE=$1 |
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
#!/bin/bash | |
if [ $# -gt 0 ]; then | |
HEIGHT=$1 | |
CONFIG=" | |
url = \"http://node-bs1.lto.network:6869/debug/stateAtHeight/$HEIGHT\" | |
output = \"balances-bs1.json\" | |
url = \"http://node-bs2.lto.network:6869/debug/stateAtHeight/$HEIGHT\" | |
output = \"balances-bs2.json\" |
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
cmake_minimum_required(VERSION 3.8) | |
project(php C) | |
# 32bit or 64bit | |
set(BITNESS 32) | |
if(CMAKE_SIZEOF_VOID_P EQUAL 8) | |
set(BITNESS 64) | |
endif() | |
# Global definitions |
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 lto.accounts import AccountFactoryED25519 | |
from itertools import permutations | |
address = "3JzSs25zWMomDHmw3jA3v9rpqqxxzmCAd9Hs" | |
words = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o"] | |
factory = AccountFactoryED25519('L') | |
def find_insert_word(): | |
print("Changing the position of each word") |
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
#!/bin/sh | |
## -*-sh-*- | |
#set -x | |
# BEGIN of icu-config-top | |
# Copyright (C) 2016 and later: Unicode, Inc. and others. | |
# License & terms of use: http://www.unicode.org/copyright.html | |
#****************************************************************************** | |
# Copyright (C) 1999-2013, International Business Machines | |
# Corporation and others. All Rights Reserved. | |
#****************************************************************************** |