Skip to content

Instantly share code, notes, and snippets.

View openoms's full-sized avatar
🏗️
building

openoms openoms

🏗️
building
View GitHub Profile

Keybase proof

I hereby claim:

  • I am openoms on github.
  • I am oms (https://keybase.io/oms) on keybase.
  • I have a public key ASCqWY7yVe1u69KVVODvL2nZLwnU76k0y0nIS2YYbwwXaQo

To claim this, I am signing this object:

@openoms
openoms / shortcuts
Last active December 11, 2018 12:00
jupyter notebook
command palette: ctrl + shift + F
pressing escape puts you in command mode, which allows you to easily create/delete/move cells
to run: shift + enter
delete cell -> d, d
undo -> z
add cell above -> a
add cell below -> b
@openoms
openoms / gist:0668dee5d6ffc28bf9f7486244c40939
Created December 13, 2018 07:27
WSL turorial for the BUIDL bootcamp
here is all you need to do to follow along with the Linux command line in Windows:
https://docs.microsoft.com/en-us/windows/wsl/install-win10
Start WSL by typing `bash` in the file explorer address bar in the desired folder
update the packages:
`sudo apt-get update`
`sudo apt-get upgrade`
intall git, pip and virtualenv:
`sudo apt-get install git`
`sudo apt-get install python3-pip`
`python3 -m pip install virtualenv`
@openoms
openoms / BTCPayServer on Raspiblitz
Created January 23, 2019 11:55 — forked from normandmickey/BTCPayServer on Raspiblitz
Install BTCPayServer on RaspiBlitz
#Install Dot-Net for ARM
cd /home/admin
sudo apt-get -y install libunwind8 gettext
wget https://download.visualstudio.microsoft.com/download/pr/201cbc49-c122-4653-a6c6-0680643d9a26/1951cfc077d868a31563a5a172d18d78/dotnet-sdk-2.1.500-linux-arm.tar.gz
wget https://download.visualstudio.microsoft.com/download/pr/9c5d6af2-868c-4021-8b25-4913daca41c3/46cfc8ddb9b8f10ebd56de1b1a534e32/aspnetcore-runtime-2.1.6-linux-arm.tar.gz
sudo mkdir /opt/dotnet
sudo tar -xvf dotnet-sdk-2.1.500-linux-arm.tar.gz -C /opt/dotnet/
sudo tar -xvf aspnetcore-runtime-2.1.6-linux-arm.tar.gz -C /opt/dotnet/
sudo ln -s /opt/dotnet/dotnet /usr/local/bin
dotnet --info
@openoms
openoms / install_openbazaar_on_RaspiBlitz
Last active March 10, 2019 15:28
Install OpenBazaar on a RaspiBlitz, install OpenBazaar client and migrate the store contents
# https://www.zokos.com/blog/site/public/2019/01/12/Self-Host%20your%20Own%20OpenBazaar%20Store/
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install build-essential git -y
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin
export GOPATH=/usr/local/gocode
export PATH=$PATH:$GOPATH/bin
go get github.com/OpenBazaar/openbazaar-go
@openoms
openoms / do-lndbackup.sh
Last active March 11, 2019 09:39 — forked from vindard/do-lndbackup.sh
A script designed for the "Raspibolt" configuration that creates a backup of the `.lnd` folder, packages it into a `.tar` archive and then uploads it to Dropbox
#!/bin/bash
# wget https://gist.github.com/openoms/7d62d0e02f121bc5d668ed4e1be1ebba/raw/a362385adfce44ad130af39e2ccc60086128173f/do-lndbackup.sh
# sudo chmod +x do-lndbackup.sh
# sudo ./do-lndbackup.sh
# DROPBOX API KEY
APITOKEN="DROPBOX-API-KEY"
if [ $APITOKEN="DROPBOX-API-KEY" ] ; then
@openoms
openoms / dietpi-automation_custom_script.log
Created March 27, 2019 09:24
RaspiBlitz build_sdcard.sh output v.1.1 on DietPi
root@DietPi:~# tail -n1000 -f /var/tmp/dietpi/logs/dietpi-automation_custom_script.log
*****************************************
* RASPIBLITZ SD CARD IMAGE SETUP v1.1 *
*****************************************
*** CHECK INPUT PARAMETERS ***
will use code from branch --> 'DietPi-dev'
*** CHECK INPUT PARAMETERS ***
will use code from user --> 'openoms'
#!/bin/bash
# from this comment https://github.com/bamarni/pi64/issues/4#issuecomment-292707581
echo -e "To stop simply press [ctrl]-[c]\n"
Maxfreq=$(( $(awk '{printf ("%0.0f",$1/1000); }' </sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq) -15 ))
while true ; do
# Health=$(perl -e "printf \"%19b\n\", $(vcgencmd get_throttled | cut -f2 -d=)")
Temp=$(vcgencmd measure_temp | cut -f2 -d=)
RealClockspeed=$(vcgencmd measure_clock arm | awk -F"=" '{printf ("%0.0f",$2/1000000); }' )
@openoms
openoms / config.display.sh
Last active May 15, 2019 10:11
Display config on the RaspiBlitz
# To run this script on your RaspiBlitz, copy the following line to the ssh terminal (after the #):
# wget hhttps://raw.githubusercontent.com/rootzoll/raspiblitz/master/alternative.platforms/dietpi/dietpi.display.sh && sudo chmod +x dietpi.display.sh && ./dietpi.display.sh
echo "Detect Base Image ..."
baseImage="?"
isDietPi=$(uname -n | grep -c 'DietPi')
isRaspbian=$(cat /etc/os-release 2>/dev/null | grep -c 'Raspbian')
isArmbian=$(cat /etc/os-release 2>/dev/null | grep -c 'Debian')
isUbuntu=$(cat /etc/os-release 2>/dev/null | grep -c 'Ubuntu')
if [ ${isRaspbian} -gt 0 ]; then
@openoms
openoms / patch.txt
Created June 2, 2019 04:53
LND patch
diff --git a/channeldb/graph.go b/channeldb/graph.go
index eaf3503c..9edd2955 100644
--- a/channeldb/graph.go
+++ b/channeldb/graph.go
@@ -3025,7 +3025,8 @@ func (c *ChannelGraph) ChannelView() ([]EdgePoint, error) {
edgeIndex, chanID,
)
if err != nil {
- return err
+ return fmt.Errorf("failed fetching edge info "+