Skip to content

Instantly share code, notes, and snippets.

@dvwright
dvwright / send_transaction_xml_testnet.js
Created January 28, 2023 02:14
Send Transaction Stellar XLM Testet
// NOTE: Untested
// Usage: node send_transaction_xml_testnet.js (this file)
import fetch from "node-fetch";
import StellarSdk from "stellar-sdk";
(async function main() {
try {
const server = new StellarSdk.Server(
"https://horizon-testnet.stellar.org"
@dvwright
dvwright / xpr_create_trustline_testnet.js
Created January 28, 2023 02:08
XRPL Create Trustline Node JS
/*
* XRP
* https://xrpl.org/xrp-testnet-faucet.html
* https://xrpl.org/tx-sender.html
*
* Your Testnet Credentials:
*
* Address
* r************
*
@dvwright
dvwright / step_by_step.md
Created April 15, 2021 22:10
Confirm Java release SHA256

Verify Java release signature MacOSX

https://jdk.java.net/15/

wget https://download.java.net/java/GA/jdk15.0.2/0d1cfde4252546c6931946de8db48ee2/7/GPL/openjdk-15.0.2_osx-x64_bin.tar.gz
wget https://download.java.net/java/GA/jdk15.0.2/0d1cfde4252546c6931946de8db48ee2/7/GPL/openjdk-15.0.2_osx-x64_bin.tar.gz.sha256

openssl dgst -sha256 openjdk-15.0.2_osx-x64_bin.tar.gz
SHA256(openjdk-15.0.2_osx-x64_bin.tar.gz)= 578b17748f5a7d111474bc4c9b5a8a06b4a4aa1ba4a4bc3fef014e079ece7c74
@dvwright
dvwright / gist:07fb17a909f436d4242011bbe8063f79
Created February 12, 2021 08:26
Verify github sha512 base64 checksum
Sync-mac-1.3.0.dmg
Sync-mac-1.3.0.dmg-sha512-base64.txt
$ cat Sync-mac-1.3.0.dmg-sha512-base64.txt
GVD/tm4c6advMgnV19F1AKvcbwPJGag/qTlTj5VjBypy0mtOx5G48WuEK7KW0j5KLlsbFu4amq6h882tT1wVkg=
$ openssl dgst -sha512 -binary Sync-mac-1.3.0.dmg | base64
GVD/tm4c6advMgnV19F1AKvcbwPJGag/qTlTj5VjBypy0mtOx5G48WuEK7KW0j5KLlsbFu4amq6h882tT1wVkg==
@dvwright
dvwright / chrome_install.sh
Created April 10, 2020 17:57
Install headless browser environment on AWS linux, google chrome, chromedriver, xvfb
#!/usr/bin/env bash
## Install packages required by headless browser testing on AWS linux
## * Google Chrome Browser
## * chromedriver
## * Xvfb
## * xclip
# Google Chrome Browser (google-chrome-stable)
@dvwright
dvwright / scp_files.go
Created June 14, 2017 20:18
scp multiple files with password in go
// modified from https://gist.github.com/jedy/3357393 - Thanks!
package main
import (
"fmt"
"golang.org/x/crypto/ssh"
"io/ioutil"
"log"
"os"
)
@dvwright
dvwright / .htaccess
Last active December 13, 2016 21:00
Navigo IE11 Navigation Example - does not work as expected
RewriteEngine On
Options +FollowSymLinks
IndexIgnore */*
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.html
@dvwright
dvwright / gin_bind.go
Last active September 2, 2023 18:53
c.Request.Body is a stream, EOF after read from, example in Golang Gin
package main
import (
"encoding/json"
"fmt"
"github.com/gin-gonic/gin"
"net/http"
)
type SimpleUser struct {
@dvwright
dvwright / api.go
Last active June 26, 2023 08:02
test api basic go-sqlmock ExpectQuery test pass one query param
package main
import (
"database/sql"
"github.com/gin-gonic/gin"
_ "github.com/go-sql-driver/mysql"
"gopkg.in/gorp.v1"
"log"
"strconv"
)