Skip to content

Instantly share code, notes, and snippets.

View Dreller's full-sized avatar

Dreller Dreller

  • Dreller
  • Québec
View GitHub Profile
@Dreller
Dreller / space.sh
Created October 17, 2021 14:45
Get Free Space for Disks
#!/bin/bash
disks=("/dev/mmcblk0p1" "/dev/mmcblk0p2")
names=("My First Disk" "My Disk #2")
i=0
diskCount=${#disks[@]}
for (( i = 0; i < diskCount; i++ )); do
diskPath=${disks[$i]}
diskName=${names[$i]}
@Dreller
Dreller / session_status.php
Last active July 13, 2020 22:36
PHP Session Status for JS
<?php
/*
* Return the status of the current PHP session in a JS readable format.
*
* Result from session_status() | JS Translation
* ------------------------------ ---------------------------
* PHP_SESSION_DISABLED 0 | none
* PHP_SESSION_NONE 1 | none
* PHP_SESSION_ACTIVE 2 | ok
@Dreller
Dreller / VOC B
Last active April 13, 2020 21:59
VOC: Quickly compile the same program
PA
* This paragraph will compile a program and propose to run it.
* Author: dreller2034, Apr 13 2020.
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* Change the @PGMLIB to set the file which contains the program source.
SET @PGMLIB "DEVCORE.PGM"
* Change the @PGMNAME to set the program file to compile.
SET @PGMNAME "DC.CREATE.FILE.SUBR"
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CLR