Assuming you have an input file like this one ...
horse green
horse blue
dog green
dog red
dog yellow
#!/bin/bash | |
# Exit script if /mnt is not mounted somewhere | |
# Prevents filling the root filesystem (/) | |
if ! mountpoint /mnt ; then | |
>&2 echo "Error: No mountpoint." | |
exit 1 | |
fi | |
# Endless loop |
#!/bin/bash | |
# Call: ./prepare-sd-card.sh /dev/sdX | |
# Danger! May wipe the wrong data... | |
exit 99 | |
# This script also copies a public key to the SSH authorized_keys file for the root user (ansible, here) | |
set -e |
<?php | |
# | |
# PiCam is placed on Buderus control panel | |
# /opt/vc/bin/raspistill -ISO 200 -t 3000 -rot 270 -awb shade -o /tmp/test.jpg | |
# | |
# Sorry, this may be a poor description | |
# | |
$img = imagecreatefromjpeg( "/tmp/test.jpg" ); |
#!/bin/bash | |
NEXTID=518 | |
LXCNAME=testct3 | |
LXCIP=192.168.2.178 | |
#TEMPLATE=archlinux-base_20190426-1_amd64.tar.gz | |
TEMPLATE=ubuntu-19.04-standard_19.04-1_amd64.tar.gz | |
OSTYPE=${TEMPLATE%%-*} | |
lvcreate -V8G -T vg_ssd_evo/vms3 -n vm-$NEXTID-disk-0 |
set HEUTE=%date:~6,4%-%date:~3,2%-%date:~0,2% | |
mkdir %HEUTE% | |
pause |
#!/bin/perl | |
# Description: | |
# Read a .js file from STDIN and write JSON-compatible output (suitable for jq) | |
# The input file in the format ... | |
# var data = { "run": [... | |
# cannot be read by jq directly. This script transforms a javascript file to json output. | |
use strict; |
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
# Sample output: | |
# pihole2# pihole -up --check-only | |
# [i] Checking for updates... | |
# [i] Pi-hole Core: update available | |
# [i] Web Interface: update available |