Skip to content

Instantly share code, notes, and snippets.

View maxsvetlik's full-sized avatar

Max Svetlik maxsvetlik

View GitHub Profile
@maxsvetlik
maxsvetlik / Configure Skycoin Miner for Pine64 Cluster.MD
Last active May 27, 2018 20:45
A guide to setting up a Pine64 Cluster as a DIY Skycoin Miner (Skywire).

Introduction

This guide walks through the process of setting up a SOPine64 Clusterboard for use as a Skycoin Miner. This idea was originally presented by Christian Ott's post PINE64 SKYMINER, which outlines the miner hardware and discusses design choices.

This guide is the result of purchasing the parts on Christian's parts list and setting the hardware up as a reasonable server that will run Skywire software.

Questions and Comments

If you encounter issues / questions / errors while following this guide, let it be known and I'll do my best to assist and/or update the guide.

TOC

@maxsvetlik
maxsvetlik / make_video_from_images.bash
Created December 13, 2017 16:54
Create a video file from an image stream using avconv. The JPG images must be ordered in a standard format filename in order for correct results.
#!/bin/bash
#This script merges a photo sequence into a video file
#The filenames for the images must be standardized which
#can be accomplished by using the 'rename_images.sh' script
#
#Obviously avconv must be installed. It is part of the libav-tools pkg
avconv -framerate 30 -f image2 -i %04d.JPG -b 65536k output_test.mov
#Now combine the audio
@maxsvetlik
maxsvetlik / rename_sequential_time_images.bash
Created December 13, 2017 16:51
This script renames sequential time (epoch time) timestamped images to a format that avconv can read and use to create a video file.
#!/bin/bash
#This script renames images named as a sequential timestamp to a standardized format used for avconv
a=0
ls vision_data/*.jpg | sed 's/^\([^0-9]*\)\([0-9]*\)/\1 \2/' | sort -k2,2n | tr -d ' ' |
while read filename; do
echo $filename
new=$(printf "%04d.JPG" ${a}) #04 pad to length of 4
ln ${filename} ${new}
echo ${i}