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
#Download from https://unofficial-builds.nodejs.org/download/release/ the appropriate build for armv6l, example https://unofficial-builds.nodejs.org/download/release/v18.9.1/node-v18.9.1-linux-armv6l.tar.gz | |
wget https://unofficial-builds.nodejs.org/download/release/v18.9.1/node-v18.9.1-linux-armv6l.tar.gz | |
tar -xzf node-v18.9.1-linux-armv6l.tar.gz | |
cd node-v18.9.1-linux-armv6l | |
sudo cp -R * /usr/local | |
node -v |
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
sudo systemctl stop [servicename] | |
sudo systemctl disable [servicename] | |
#rm /etc/systemd/system/[servicename] | |
#rm /etc/systemd/system/[servicename] symlinks that might be related | |
sudo systemctl daemon-reload | |
sudo systemctl reset-failed |
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 time import sleep | |
import ssl | |
import json | |
import os | |
from paho.mqtt.client import Client | |
username = "your VRM email" | |
password = "your VRM pasword" | |
portal_id = "your VRM portal ID" |
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
#!/usr/bin/env bash | |
#Install brew and qemu + cloud init metadata dependencies | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" | |
brew install qemu | |
brew install cdrtools | |
rm -rf /tmp/ubuntuqemuboot | |
#download Ubuntu 20.04 Cloud Image and resize to 30 Gigs | |
mkdir -p /tmp/ubuntuqemuboot/images |
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
# Enable Hyper-V feature (reboot needed) | |
#### Install Multipass from https://github.com/CanonicalLtd/multipass/releases/ | |
#### Create your Ubuntu LTS VM (on your Hyper-V / Virtualbox machine) | |
multipass launch --cpus 2 --mem 2G --name microk8s --disk 40G | |
# Update & upgrade | |
multipass exec microk8s -- sudo apt-get -y update | |
multipass exec microk8s -- sudo apt-get -y upgrade | |
multipass exec microk8s -- sudo apt -y autoremove | |
# getting rid of "nano" as default editor | |
multipass exec microk8s -- sudo update-alternatives --set editor /usr/bin/vim.basic |
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
#cloud-config | |
# vim: syntax=yaml | |
# | |
# The current version of cloud-init in the Hypriot rpi-64 is 0.7.9 | |
# When dealing with cloud-init, it is SUPER important to know the version | |
# I have wasted many hours creating servers to find out the module I was trying to use wasn't in the cloud-init version I had | |
# Documentation: http://cloudinit.readthedocs.io/en/0.7.9/index.html | |
# Set your hostname here, the manage_etc_hosts will update the hosts file entries as well |
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
#cloud-config | |
package_upgrade: true | |
packages: | |
- zsh | |
- tmux | |
- nmap | |
- curl | |
- wget | |
- git | |
- htop |
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
#cloud-config | |
package_update: true | |
package_upgrade: true | |
package_reboot_if_required: true | |
manage-resolv-conf: true | |
resolv_conf: | |
nameservers: | |
- '8.8.8.8' |
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 osgeo import gdal | |
import numpy | |
g = gdal.Open ("baikal_subset.tif") | |
if g is None: | |
raise IOError, "Couldn't open baikal_subset.tif" | |
b3 = g.GetRasterBand(3).ReadAsArray().astype(np.float32) | |
b4 = g.GetRasterBand(4).ReadAsArray().astype(np.float32) |
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
apt-get remove -y --purge x11-common | |
apt-get autoremove -y --purge | |
apt-get install -y deborphan | |
deborphan | xargs dpkg -P # do this a bunch of times |
NewerOlder