Skip to content

Instantly share code, notes, and snippets.

@m1ari
m1ari / Notes.md
Last active February 10, 2021 07:35
EverGreenCoin - Manual Staker Image

Create User

sudo useradd -d /var/lib/evergreencoin -c 'EverGreenCoin Wallet Daemon' -r -s /usr/sbin/nologin evergreencoin`

Create Storage

sudo mkdir /var/lib/evergreencoin

Install Libraries and Tools

ukhasnet-prod1=# select length(packet),count(*) from ukhasnet.upload group by length;
length | count
--------+---------
1 | 53
2 | 33
3 | 468
4 | 1727
5 | 552
6 | 504
7 | 658
@m1ari
m1ari / gist:3d6c76dae8383aa94eca
Created March 10, 2016 11:37
ukhasnet data types (DB)
ukhasnet-prod1=# select * from ukhasnet.fieldtypes;
id | type | name | dataid
----+----------+--------------------+--------
1 | Float | Temperature | T
2 | Float | Voltage | V
3 | Float | RSSI | R
4 | Float | Pressure | P
5 | Float | Humidity | H
6 | Location | Location | L
7 | Float | Sun | S
hardstatus alwayslastline "%{yb} %H %{c.} | %w %= | %{yb} %c:%s %Y-%m-%d %{c.} | %l"
termcap xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
terminfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
defutf8 on
utf8 on on
term xterm
vbell off
@m1ari
m1ari / RPI Streaming notes
Last active January 20, 2023 13:32
Stream raspberry pi camera over multicast and cope with raspivid exiting
This requires a couple of windows (or a screen/tmux session)
First create a fifo to use
mkfifo video.h264
In the first window start raspivid in the following way
while true; do raspivid -n -vf -hf -w 460 -h 270 -b 512000 -t 36000000 -o video.h264 -v; done
In the second window start vlc like:
cvlc video.h264 --sout "#duplicate{dst=std{access=udp,mux=ts,dst=239.255.1.2:1234}}" :demux=h264 --ttl 4 -I http --sout-keep -v --loop
@m1ari
m1ari / serialread.c
Last active December 25, 2015 09:29
serial read with statemachine.
#include <stdio.h>
#include <string.h>
/* On Linux systems you might need to run the following command first to
* stop the system buffering until a newline:
* stty -icanon
*/
void main (){
char NMEA_string[70] = "";
@m1ari
m1ari / batc_chat.pl
Created September 19, 2013 11:14
Short perl script to show BATC chat in a console window
#!/usr/bin/perl -w
use strict;
use LWP::UserAgent;
use HTTP::Request::Common qw(GET);
# Channel is the feed number we want the chat for.
my $channel=1153;
my $ua = new LWP::UserAgent;
$ua->cookie_jar( {} );