Skip to content

Instantly share code, notes, and snippets.

@abuiles
abuiles / config.ini
Created September 3, 2022 17:07 — forked from orendon/config.ini
Visa appointment (renewal)
View config.ini
[USVISA]
; Account and current appointment info from https://ais.usvisa-info.com
USERNAME = YOUR_EMAIL
PASSWORD = YOUR_PASSWORD
SCHEDULE_ID = YOUR_ID
MY_SCHEDULE_DATE = YYYY-MM-DD
; Spanish - Colombia
COUNTRY_CODE = es-co
; Bogotá
FACILITY_ID = 26
View stellar-core.cfg
HTTP_PORT=11626
PUBLIC_HTTP_PORT=true
LOG_FILE_PATH=""
NETWORK_PASSPHRASE="Test SDF Network ; September 2015"
UNSAFE_QUORUM=true
FAILURE_SAFETY=1
CATCHUP_RECENT=10
@abuiles
abuiles / cap33.go
Created August 10, 2020 23:56
Sample cap33 on standalone
View cap33.go
package main
import (
"log"
"github.com/stellar/go/clients/horizonclient"
"github.com/stellar/go/keypair"
"github.com/stellar/go/txnbuild"
)
View json_paths.sql
CREATE TABLE accounts(address text NOT NULL);
INSERT INTO accounts(address) SELECT md5(RANDOM()::TEXT) FROM generate_series(1, 500000);
CREATE TABLE balances(claimants JSONB NOT NULL);
CREATE INDEX balances_gin_idx ON balances USING gin(claimants jsonb_path_ops);
-- insert 500k balances, one balance per account
INSERT INTO balances(claimants)
SELECT json_build_array(json_build_object('destination',a.address,'predicate', md5(RANDOM()::TEXT))) FROM accounts as a;
View p14.go
package main
import (
"log"
"github.com/stellar/go/clients/horizonclient"
"github.com/stellar/go/keypair"
"github.com/stellar/go/txnbuild"
)
View out.ts
declare namespace xdr {
interface UINT {
readonly MAX_VALUE: 4294967295;
readonly MIN_VALUE: 0;
read(io: Buffer): number;
write(value: number, io: Buffer): void;
isValid(value: number): boolean;
toXDR(value: number): Buffer;
fromXDR(input: Buffer, format?: "raw"): number;
fromXDR(input: string, format: "hex" | "base64"): number;
@abuiles
abuiles / xdr.ts
Last active April 30, 2020 23:40
View xdr.ts
declare namespace xdr {
interface SignedInt {
readonly MAX_VALUE: 2147483647;
readonly MIN_VALUE: -2147483648;
read(io: Buffer): number;
write(value: number, io: Buffer): void;
isValid(value: number): boolean;
toXDR(value: number): Buffer;
fromXDR(input: Buffer, format?: 'raw'): number;
fromXDR(input: string, format: 'hex' | 'base64'): number;
@abuiles
abuiles / protocol13.md
Last active April 25, 2020 14:34
Protocol 13 support
View protocol13.md

Protocol 13 support

Stellar Protocol 13 is coming soon, and we need your help bringing support for it to your SDK.

The most relevant changes for SDKs are:

View foo.diff
122927c122927
< 7cf06b94575aa6e87112fbd58fea751a3c27f30e5fbe2ae47192c79d0a56bc07,24338403,2,GDGUS6YJV4QKIQZOF7WL7BDEQ4NASB7LUYHH6RH4UB44RL3TNE3KVOHO,67319953052663812,-1794967296,1,104532644921876480,AAAAAM1JewmvIKRDLi/sv4RkhxoJB+umDn9E/KB5yK9zaTaqlQL5AADvKyQAAAAEAAAAAQAAAAAAAAAAAAAAAF0DTNYAAAAAAAAAAQAAAAAAAAAAAAAAAHIKY+bukkRIu/ORC90+OAUYd8VJsLXOY/dBdtjHcTqwAAAAFloLwAAAAAAAAAAAAXNpNqoAAABAgixOvqGdVyD/DYW3PYalzU
7cf06b94575aa6e87112fbd58fea751a3c27f30e5fbe2ae47192c79d0a56bc07,24338403,2,GDGUS6YJV4QKIQZOF7WL7BDEQ4NASB7LUYHH6RH4UB44RL3TNE3KVOHO,67319953052663812,-1794967296,1,104532644921876480,AAAAAM1JewmvIKRDLi/sv4RkhxoJB+umDn9E/KB5yK9zaTaqlQL5AADvKyQAAAAEAAAAAQAAAAAAAAAAAAAAAF0DTNYAAAAAAAAAAQAAAAAAAAAAAAAAAHIKY+bukkRIu/ORC90+OAUYd8VJsLXOY/dBdtjHcTqwAAAAFloLwAAAAAAAAAAAAXNpNqoAAABAgixOvqGdVyD/DYW3PYalzUmxdzQuNUIfxoJjfXFDCkRXlN/4UN4kSWoiMreRhbSSnEiPk/qp38qs+/r7lLQ7AA==,AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAA=,AAAAAgAAAAIAAAADAXNf4wAAAAAAAAAAzUl7Ca8gpEMuL+y/hGSHGgkH66YOf0T8oHnIr3NpNqoAAAAWcry/YQDvKyQAAAADAAA
View limit.sql
EXPLAIN ANALYZE
SELECT
ht.id, ht.transaction_hash, ht.ledger_sequence, ht.application_order, ht.account, ht.account_sequence, ht.max_fee,
COALESCE(ht.fee_charged, ht.max_fee) as fee_charged, ht.operation_count, ht.tx_envelope, ht.tx_result,
ht.tx_meta, ht.tx_fee_meta, ht.created_at, ht.updated_at, COALESCE(ht.successful, true) as successful,
array_to_string(ht.signatures, ',') AS signatures, ht.memo_type, ht.memo, lower(ht.time_bounds) AS valid_after,
upper(ht.time_bounds) AS valid_before, hl.closed_at AS ledger_close_time, ht.inner_transaction_hash, ht.fee_account,
ht.new_max_fee, array_to_string(ht.inner_signatures, ',') AS inner_signatures
FROM history_transactions ht
LEFT JOIN history_ledgers hl