Skip to content

Instantly share code, notes, and snippets.

View apevec's full-sized avatar

Alan Pevec apevec

  • Red Hat
  • München / Varaždin
View GitHub Profile
https://globalmeteornetwork.org//wiki/index.php?title=Main_Page#Backup_and_restore_configuration_and_RSA_keys
> copy the files .config, platepar_cmn2010.cal and mask.bmp to the folder /home/pi/source/RMS/, and the files id_rsa and id_rsa.pub to the folder /home/pi/.ssh/
> cp .config platepar_cmn2010.cal mask.bmp /home/pi/source/RMS/
> cp id_rsa id_rsa.pub /home/pi/.ssh/
> chmod 400 ~/.ssh/id_rsa*
Steps to restore RMS headless (RasPi w/o display) setup on your Linux workstation:
1. create fresh RMS image on a new SD card: unzip -p "RMS_RPi4_image_20210626.zip" | dd of=/dev/mmcblk0 bs=4M status=progress conv=fsync
2. mount the card (e.g. via GNOME Files) and update the hostname in rootfs on the card etc/hostname and etc/hosts (line for 127.0.1.1 <hostname>)
@apevec
apevec / dd-ext.sh
Created December 28, 2019 11:03
write image file $1 to the device $2
#!/bin/bash
# write image file $1 to the device $2
if [ "${1%.gz}" = "${1}" ]; then
if [ "${1%.xz}" = "${1}" ]; then
if [ "${1%.zip}" = "${1}" ]; then
# Assuming uncompressed image for the unknown extensions
set -x
time dd if="$1" of=$2 bs=4M status=progress conv=fsync
@apevec
apevec / zuul_build_report.py
Last active June 11, 2018 14:15
Determine maximum number of concurrently running Zuul jobs
# copied&modified slightly from https://github.com/openstack-infra/zuul/blob/master/zuul/driver/sql/sqlconnection.py
# Copyright 2014 Rackspace Australia
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# dnf --enablerepo=fedora-rawhide install python-oslo-db
Installing:
python-alembic noarch 0.8.6-1.fc25 fedora-rawhide 731 k
python-editor noarch 1.0-1.fc25 fedora-rawhide 16 k
python-migrate noarch 0.10.0-2.fc24 fedora-rawhide 231 k
python-oslo-db noarch 1.7.2-1.fc23 fedora 212 k
python-sqlparse noarch 0.1.18-5.fc24 fedora-rawhide 78 k
# dnf --enablerepo=fedora-rawhide install python2-oslo-db
Installing:
@apevec
apevec / mk-git-objects.sh
Created November 14, 2013 18:14
Pre-create git object folders so sharing can work on NFS shares with nosetuid option. Don't forget to set core.sharedrepository=1 in $1/config
#!/bin/bash
set -e
cd $1/objects
for i in $(seq 0 255); do
hex=$(printf "%02x " $i)
mkdir -p $hex
chgrp devel $hex
chmod 770 $hex
done