Skip to content

Instantly share code, notes, and snippets.

View bensig's full-sized avatar
🚀
libre.org

Ben Sigman bensig

🚀
libre.org
View GitHub Profile
@bensig
bensig / publish-expo-android.md
Created August 30, 2021 19:51
Publishing an Expo App for Android

#Publishing an Expo App for Android

  1. Make sure you have the pc-api-*.json for the Google Service Account
  2. Increment "versionCode" in app.json
  3. Run eas build --platform android
  4. Run eas submit --platform android
@bensig
bensig / bump.sh
Created September 22, 2021 22:52
Simple bash script to bump the version of an xcodeproj and gradle to the same version number
#!/bin/sh
# simple bash script to update the build number to whatever is entered.
appname="yourname"
# variables
pbxproj="ios/$appname.xcodeproj/project.pbxproj";
gradle='android/app/build.gradle';
# get current versions
androidVersion=`cat $gradle |grep -m1 "versionName" | cut -d'"' -f2 | tr -d ';' | tr -d ' '`
@bensig
bensig / expoVersionUpdate.sh
Created September 23, 2021 00:46
Bash Script to Update Expo App Version Code
#!/bin/bash
# Script to bump expo.js version code
# get current versions
currentVersion=`cat app.json|jq '.[] | .android | .versionCode'`
# show current versions
echo "The current version is: $currentVersion"
# get new version from user input
@bensig
bensig / check_btcd_sync.sh
Last active October 30, 2021 09:51
simple script to check the bitcoin sync level of your btcd node
# simple script to check the bitcoin sync level of your btcd node
echo `btcctl -s localhost:8337 getbestblock|jq -r -c .height`/`curl -s https://blockchain.info/q/getblockcount 2>/dev/null`*100|bc -l
@bensig
bensig / check_bitcoind_sync.sh
Last active October 30, 2021 10:34
Check bitcoind sync level
# simple script to check the bitcoin sync level of your bitcoind node
echo `bitcoin-cli getblockcount 2>&1`/`curl -s https://blockchain.info/q/getblockcount 2>/dev/null`*100|bc -l
@bensig
bensig / bitcoinbalance.sh
Created November 24, 2021 02:14
Script to get bitcoin balance of any BTC address
#!/bin/bash
# description: prints balance for any bitcoin address
# requirements: jq and curl
# usage: $ bitcoinbalance.sh btcaddress
curl -s https://api.blockcypher.com/v1/btc/main/addrs/$1 | jq '.balance' | awk '{print $1/100000000}'
@bensig
bensig / versionUpdate.sh
Created January 17, 2022 06:18
Script to update version in Info.plist and app/build.gradle
#!/bin/sh
# bash script to update build number
# variables
PLIST=`find ./ios -name "Info.plist"`
GRADLE=`find ./android/app -name "build.gradle"`
BRANCH=`git symbolic-ref --short -q HEAD`
# announcement
echo
@bensig
bensig / checkVersion.sh
Created January 17, 2022 06:19
Script to compare the local version of Info.plist and app/build.gradle to the released version on the AppStore and Play Store
#!/bin/bash
# check versions in Info.plist and app/build.gradle
# compare to public releases on both apple and google stores
#variables
PLIST=`find ./ios -name "Info.plist"`
GRADLE=`find ./android/app -name "build.gradle"`
APP_ID="com.yourapp.app"
GAPP_ID="com.yourapp.app"
@bensig
bensig / transaction.sh
Last active January 25, 2022 08:00
Send a transaction with a memo to a list contained in recipients.txt
#!/bin/bash
# This sends an on-chain transaction with a memo defined in the MEMO section.
#
# Usage:
# 1. Create a file such as a "recipients.txt" file where you list all of the recipients one per line
# 2. Set the account and memo under variables below - make sure your wallet is unlokced!
# Then run:
# ./transaction.sh recipients.txt
# variables
@bensig
bensig / proton-mass-transfer-tool.sh
Created January 25, 2022 08:37
Mass send tokens on Proton Network
#!/bin/bash
# You should already have cleos, keosd installed with a wallet created
# In that wallet you will need your private key
# Usage:
# 1. Create a recipients.csv in the same dir as this script
# ** FORMAT OF CSV SHOULD BE like this:
# benobi 0.00000001
# paul 0.00000001
# That will send one SAT to "benobi" and 1 sat to "paul"
# 2. Update the TOKENBANK - this is the account you will be sending FROM