create your docker-compose file like this one:
version: '3'
volumes:
nextcloud:
#!/bin/bash | |
gource -1800x1200 --title "My App" --hide progress --max-user-speed 500 --seconds-per-day 0.15 -e 0.005 --bloom-intensity 0.05 --hide filenames -o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -crf 19 -threads 0 -bf 0 output.mp4 |
Mount the flash partition (not necessary but... )
mount -o remount,rw /flash
Normally the external HDD is automatically mounted by LibreELEC, so you just need to format is using ext4 partition datatype
umount /dev/sda2 # check which partition was mounted automatically - `df -h`
To make this answer a useful one, a minimal example for a daily automatic scheduled script at 01:30.
sudo vim /usr/lib/systemd/system/scheduledScript.service
sudo vim /usr/lib/systemd/system/scheduledScript.timer
(The folder /usr/lib/systemd/system/... is the default folder containing all .service files)
#!/bin/bash | |
# this file will reconnect the wifi when you wake up you OS (tested on Arch) | |
# save this file /usr/lib/systemd/system-sleep | |
case $1 in | |
pre) | |
# unload the modules before going to sleep | |
;; | |
post) | |
sleep 2 | |
systemctl restart wpa_supplicant.service |
#!/usr/bin/env sh | |
# It seems to have some cuda issues with sleep/suspend | |
# I had this with pytorch | |
sudo rmmod nvidia_uvm | |
sudo modprobe nvidia_uvm | |
-- Create enumetation | |
CREATE TYPE currency AS ENUM ('USD', 'BRL', 'USD'); | |
-- Add value | |
ALTER TYPE currency ADD VALUE 'GBP'; | |
-- Remove value | |
DELETE FROM pg_enum | |
WHERE enumlabel = 'GBP' | |
AND enumtypid = ( SELECT oid FROM pg_type WHERE typname = 'currency') |
$ git config --global --unset credential.helper
$ git config --system --unset credential.helper
SQLAlchemy doesn't generate a CREATE/DROP script for an existing enumeration datatype in Postgresql.
For that, you need to manually change your generated version script - versions/HASH_NUMBER.py
and change the
datatype manually.
versions/SHA.py
def upgrade():
if not op.get_context().as_sql:
connection = op.get_bind()
Sometimes you are working in a feature branch that was opened a long time ago and, you would like to reorganize all the commits from this feature branch.
This branch normally can be very confusing to read and there are some tips that you should know before doing a rebase (squashing).
The first thing that you should do is to understand how is organized your branch.