<commit_before>Collector (including printer)
--

provision a card:

    diskutil list
    diskutil unmountDisk /dev/diskn
    sudo dd bs=1m if=~/Downloads/2015-01-31-raspbian.img of=/dev/diskn

then

    sudo raspi-config
    expand file system

reboot

    sudo apt-get update && sudo apt-get upgrade -y

install avahi and node

    git clone https://github.com/radiodan/provision
    cd provision
    sudo ./provision avahi node

change its name to "collector"

    sudo pico /etc/hosts
    sudo pico /etc/hostname

    sudo gem install foreman --no-ri --no-rdoc

install whe

    cd
    git clone https://github.com/libbymiller/whe
    cd whe
    npm install

try it

    foreman start -p 3000 -f collector/Procfile

stop it

install supervisord for process management

    sudo apt-get install supervisor -y

    sudo cp shared/supervisor.conf /etc/init.d/supervisor
    sudo cp collector/collector_supervisor.conf /etc/supervisor/conf.d/collector.conf
    sudo cp printer/printer_supervisor.conf /etc/supervisor/conf.d/printer.conf

    # Remove existing scripts
    sudo update-rc.d collector remove

create RAM disks for relevant paths:

    sudo cat shared/fstab >> /etc/fstab

copy image deletion script to cron:

    sudo cp collector/whe-delete-images.sh /etc/cron.hourly/

restart, then run:

    sudo supervisorctl reload


---

Snapper
--

provision a card:

    diskutil list
    diskutil unmountDisk /dev/diskn
    sudo dd bs=1m if=~/Downloads/2015-01-31-raspbian.img of=/dev/diskn<commit_msg>Cron doesn't run script with .sh<commit_after>Collector (including printer)
--

provision a card:

    diskutil list
    diskutil unmountDisk /dev/diskn
    sudo dd bs=1m if=~/Downloads/2015-01-31-raspbian.img of=/dev/diskn

then

    sudo raspi-config
    expand file system

reboot

    sudo apt-get update && sudo apt-get upgrade -y

install avahi and node

    git clone https://github.com/radiodan/provision
    cd provision
    sudo ./provision avahi node

change its name to "collector"

    sudo pico /etc/hosts
    sudo pico /etc/hostname

    sudo gem install foreman --no-ri --no-rdoc

install whe

    cd
    git clone https://github.com/libbymiller/whe
    cd whe
    npm install

try it

    foreman start -p 3000 -f collector/Procfile

stop it

install supervisord for process management

    sudo apt-get install supervisor -y

    sudo cp shared/supervisor.conf /etc/init.d/supervisor
    sudo cp collector/collector_supervisor.conf /etc/supervisor/conf.d/collector.conf
    sudo cp printer/printer_supervisor.conf /etc/supervisor/conf.d/printer.conf

    # Remove existing scripts
    sudo update-rc.d collector remove

create RAM disks for relevant paths:

    sudo cat shared/fstab >> /etc/fstab

copy image deletion script to cron:

    sudo cp collector/whe-delete-images.sh /etc/cron.hourly/whe-delete-images

restart, then run:

    sudo supervisorctl reload


---

Snapper
--

provision a card:

    diskutil list
    diskutil unmountDisk /dev/diskn
    sudo dd bs=1m if=~/Downloads/2015-01-31-raspbian.img of=/dev/diskn
{'fraction_non_alphanumeric': 0.08055009823182711, 'fraction_numerical': 0.014407334643091027, 'mean_word_length': 2.833124215809285, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3562735', 'n_tokens_mistral': 1115, 'n_tokens_neox': 971, 'n_words': 302}