Skip to content

Instantly share code, notes, and snippets.

@YeeJiaWei
YeeJiaWei / script.sh
Created February 13, 2023 14:05
Script to Setting Up Octoprint on Raspbian
# Need at least Python 3.7, 3.8, 3.9 or 3.10 for basic packages
python3 --version
cd ~
sudo apt update
# Install required packages
sudo apt install python3 python3-pip python3-dev python3-setuptools python3-venv git libyaml-dev build-essential libffi-dev libssl-dev
mkdir OctoPrint && cd OctoPrint
@YeeJiaWei
YeeJiaWei / update_swap.sh
Created January 19, 2023 07:36
Script for Update Swap on Raspbian OS
sudo dphys-swapfile swapoff
# Amount of system RAM Recommended swap space
# less than 2 GB 2 times the amount of RAM
# 2 GB - 8 GB Equal to the amount of RAM
# 8 GB - 64 GB 0.5 times the amount of RAM
# more than 64 GB workload dependent
# CONF_SWAPSIZE=2048
@YeeJiaWei
YeeJiaWei / ubuntu-make-swap-file.sh
Created January 19, 2023 07:27 — forked from namgivu/ubuntu-make-swap-file.sh
increase swap file size to 8Gb
# ref. https://askubuntu.com/a/1075516/22308
sudo swapoff /swapfile # make all swap off
sudo rm -rf /swapfile # remove the current
# 8*1024Mb=8192Mb
sudo dd if=/dev/zero of=/swapfile bs=1M count=8192 # resize the swapfile to 8Gb
sudo chmod 600 /swapfile
sudo mkswap /swapfile # format the file as swap
@YeeJiaWei
YeeJiaWei / laravel.yml
Created February 16, 2022 12:33
Laravel Github Action with Mysql
name: Laravel
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
laravel-tests: