Skip to content

Instantly share code, notes, and snippets.

Avatar

soulmachine soulmachine

View GitHub Profile
View microk8s.md

Install MicroK8s on Linux

sudo snap install microk8s --classic

Check the status while Kubernetes starts

microk8s status --wait-ready

Turn on the services you want

@soulmachine
soulmachine / nfs-proxmox.md
Last active Sep 21, 2021
Launch a NFS server on Proxmox
View nfs-proxmox.md

Method 1: NFS server on LXC container

Create a priviledged LXC container with:

mount=nfs,nesting=1

apt update

apt install nfs-kernel-server

@soulmachine
soulmachine / debian-nodejs.md
Last active Apr 30, 2020
Install NodeJS on Debian 10
View debian-nodejs.md
adduser node
usermod -aG sudo node

Create a new file /etc/sudoers.d/node:

node ALL=(root) NOPASSWD:ALL
View redis.md

Install Redis on Debian 10

Install and Configure

apt install redis-server
sudo systemctl enable redis
sudo systemctl restart redis
sudo systemctl status redis
View mongodb.md

Install MongoDB on Debian 10:

sudo apt-get install gnupg
wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -

echo "deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.2 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list


sudo apt-get update
@soulmachine
soulmachine / proxmox.md
Last active Dec 8, 2019
Proxmox VE settings
View proxmox.md
  1. Open /etc/apt/sources.list.d/pve-enterprise.list and comment out the following line
# deb https://enterprise.proxmox.com/debian/pve buster pve-enterprise
  1. Remove No valid subscription

    Backup proxmoxlib.js:

@soulmachine
soulmachine / cloudSettings
Last active Aug 11, 2021
Visual Studio Code Settings Sync, for Node.js, TypeScript, Python, Go, C++ and Rust. Install this extension https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync, fill in this gist ID, then everything will be installed automatically
View cloudSettings
{"lastUpload":"2021-08-11T20:50:41.906Z","extensionVersion":"v3.4.3"}
@soulmachine
soulmachine / LearningRateBatchScheduler.py
Created May 6, 2019
LearningRateBatchScheduler copied from experimental/resnet50_keras/resnet50.py
View LearningRateBatchScheduler.py
# Copied from https://github.com/tensorflow/tpu/blob/master/models/experimental/resnet50_keras/resnet50.py#L117
from absl import logging
from tensorflow.keras import backend as K
BASE_LEARNING_RATE = 0.4
# Learning rate schedule
LR_SCHEDULE = [ # (multiplier, epoch to start) tuples
(1.0, 5), (0.1, 30), (0.01, 60), (0.001, 80)
@soulmachine
soulmachine / _install.sh
Created Jun 25, 2018 — forked from marklit/_install.sh
Find the cheapest availability zone across all regions for an EC2 spot instance type
View _install.sh
pip install sh
View press.one
{"sig":"3f031dfe09afeaaefd498c2f625e1b378b8fdf789af7c65e475bb5c5cdb857787af439cca7a1d0f4ff4daf77c583fdb5394b07955b6a4e9f4ec666793a7d825c1","msghash":"6a83f85fc481f8a2d48e421b83bbdee911a73d067fbe8d1af65ee18b9dd4cd27"}