This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15:02:24 root@data:~# apt-key list | |
/etc/apt/trusted.gpg | |
-------------------- | |
pub 2048R/BD33EEB8 2013-02-23 | |
uid pkgr.io (http://pkgr.io) <[email protected]> | |
pub 4096R/1F4C1BCE 2013-12-29 | |
uid overviewer.org (Overviewer Build Key) <[email protected]> | |
/etc/apt/trusted.gpg.d/debian-archive-jessie-automatic.gpg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
IMG="$1" | |
if [[ -e $IMG ]]; then | |
P_START=$( fdisk -lu $IMG | grep Linux | awk '{print $2}' ) # Start of 2nd partition in 512 byte sectors | |
P_SIZE=$(( $( fdisk -lu $IMG | grep Linux | awk '{print $3}' ) * 1024 )) # Partition size in bytes | |
losetup /dev/loop2 $IMG -o $(($P_START * 512)) --sizelimit $P_SIZE | |
fsck -f /dev/loop2 | |
resize2fs -M /dev/loop2 # Make the filesystem as small as possible |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import Image, ImageDraw, ImageFont | |
import sys, os, re | |
# FName assumed to be in YYYYMMDDHHMMSS.jpg format | |
fname = sys.argv[1] | |
assert fname | |
assert os.path.exists(fname) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# The date is assumed to be today, but you can provide an override on the command line. | |
if [[ ! -z $1 ]]; then | |
DATE="$1" | |
DATE2=$( date -d $DATE +'%A %d %B %Y' ) | |
else | |
DATE=$( date +'%Y%m%d') | |
DATE2=$( date +'%A %d %B %Y' ) | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Checks the remote storage is mounted and tries to remount it if it's not. | |
# Once it's mounted, move any images waiting from the temporary local storage | |
# to the remote share. | |
# Is it mounted? | |
if ! mount | grep -q '/DATA'; then | |
# Try to mount | |
sudo mount -a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# takes 3 pictures, 20 seconds apart. | |
function check { | |
# Certain conditions cause raspistill to lock up, primarily if it has trouble writing the image to storage. | |
# Since we store locally now (we didn't use to) it's not such a problem | |
# but if you're saving direct to NFS or CIFS these checks are important. | |
PID=$(ps ax | grep raspistill | grep -v grep | awk '{print $1}') | |
if [[ ! -z "$PID" ]]; then |