Skip to content

Instantly share code, notes, and snippets.

View ronilaukkarinen's full-sized avatar
🔥
on fire! 🔥🔥🔥

Roni Laukkarinen ronilaukkarinen

🔥
on fire! 🔥🔥🔥
View GitHub Profile
@ronilaukkarinen
ronilaukkarinen / filesystem.md
Created August 26, 2022 16:37
Backup of flood discussion: Support systems that use quota instead of df #421

Flood uses df -T in server/util/diskUsageUtil.ts where it defines the disks in use. However, I have a box that has a jail and df is useless as it shows all other filesystems we don't use in our jail. Users have to use quota to get their own data usage on their space.

As quota uses different format than df it's not enough to just change the command. We also need more arguments to get all data in the same line:

$ quota -w --show-mntpoint
Disk quotas for user rolle (uid 1020): 
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
/dev/sdb1 /home2 1059357988  3905945600 3905945600          266012       0       0  

Accessible polylang language navigation

Snippets

Internal GitBook note: These snippets are currently the most up to date versions available. Please keep all the scripts and code up to date. Whenever you make changes to the scripts in the project and it's generally usable and doesn't contan any project based code, update it here as well. This way we have this version right here always fresh to use in the next project.

/**
 * Show Polylang Languages with Custom Markup (for accessibility reasons)
 */
@ronilaukkarinen
ronilaukkarinen / ruuvicollector.service
Last active December 23, 2021 20:17
Working systemd service script for RuuviCollector. Tested on Fedora 32. All other attempts as user didn't measure any data.
[Unit]
Description=RuuviCollector
After=influxd.service
[Service]
Type=simple
ExecStart=/usr/bin/java -jar /home/rolle/RuuviCollector/target/ruuvi-collector-0.2.jar
Restart=always
User=root
@ronilaukkarinen
ronilaukkarinen / cron-startup-tasks.sh
Last active November 18, 2021 13:12
cron-startup-tasks.sh
#!/bin/bash
# These commands will run on MacOS startup, cron @reboot
# Quit Stand Up
/usr/bin/osascript -e 'quit app "Stand Up"'
# Reset Stand Up app settings
/bin/rm -rf "/Users/rolle/Library/Containers/com.keenappsgroup.standapp"
# Start Stand Up

Keybase proof

I hereby claim:

  • I am ronilaukkarinen on github.
  • I am ronilaukkarinen (https://keybase.io/ronilaukkarinen) on keybase.
  • I have a public key whose fingerprint is 8019 1A2F B62E AEED 70A1 8C28 0A20 4175 13C5 0A7D

To claim this, I am signing this object: