Skip to content

Instantly share code, notes, and snippets.

switch ntp for ntpsec (because ?? security, support, logging features, find that accuracy/feature comparison chart again)
use gpsd from git head, armbian/debian package is several versions/features behind
gpsd -r; missing from pkg version, probably a bad idea anyway since the neo6m rtc/batt is likely for fix/ephemeris and gps will send 1969 without sat lock
gpsd -G; not working to bind * instead of localhost, try in newer version -- need this for u-center access remotely from Windows
https://www.u-blox.com/sites/default/files/products/documents/u-blox6_ReceiverDescrProtSpec_%28GPS.G6-SW-10018%29_Public.pdf
per page 39 disable SBAS, other timepulse/timing tips
see if 'static' mode available on 6m or only T versions
chronodot ds3231 rtc tcxo with battery for initial time / no fix / no network situations
@Grogdor
Grogdor / gist:27691c45bab78617e875fd53ca2d094c
Created January 31, 2018 03:15
NanoPi Neo running armbian debian with ntp serial uart GPS gpio PPS from u-blox NEO-6M (GY-NEO6MV2)
Linux nanopineo 4.14.15-sunxi #28 SMP Mon Jan 29 07:24:48 CET 2018 armv7l GNU/Linux
Order "GY-NEO6MV2" GPS module from Aliexpress for $4
Add uart1 and pps-gpio fdt overlays, assign PPS pin
per https://docs.armbian.com/User-Guide_Allwinner_overlays/
Using a GPIO pin instead of a uart control pin because this
armbian kernel already has CONFIG_PPS_CLIENT_GPIO=m instead
of LDISC and not even sure it would work on a CTS pin anyway.
-=-=-=-=-=-=-=-=-=-=-= u-boot/spl onto sdcard da0 =-=-=-=-=-=-=-=-=-
/usr/ports/sysutils/u-boot-nanopi-neo/make install clean
dd if=/usr/local/share/u-boot/u-boot-nanopi_neo/u-boot-sunxi-with-spl.bin of=/dev/da0 bs=1024 seek=8
dd if=/usr/local/share/u-boot/u-boot-nanopi_neo/u-boot.img conv=notrunc,sync of=/dev/da0 bs=1024 seek=40
-=-=-=-=-=-=-=-= partition sdcard, 8MB msdos /boot, remainder UFS =-=-=-=-=-=-=-
(clear card's partitions first? gpart list/delete/destroy)
gpart create -s MBR da0
@Grogdor
Grogdor / gist:f90938fae30ae4386614
Created January 27, 2016 12:37
Sun Fire V100 serial cable pinout and LOM notes for booting FreeBSD
avail memory = 764035072 (728 MB)
cpu0: Sun Microsystems UltraSparc-IIe Processor (548.00 MHz CPU)
1 - brown
2 - red
3 - orange
4 - yellow
5 - green
6 - blue
7 - purple
grogdor:/usr/local/etc/lighttpd# uname -a
FreeBSD grogdor.com 6.4-STABLE FreeBSD 6.4-STABLE #1: Tue May 19 11:03:07 EDT 2009 grogdor@grogdor.com:/usr/obj/usr/src/sys/GROGDOR i386
grogdor:/usr/local/etc/lighttpd# uptime
6:21AM up 432 days, 8:25, 2 users, load averages: 0.00, 0.00, 0.00
grogdor:/usr/local/etc/lighttpd#
grogdor:/usr/local/etc# shutdown -p now
\Shutdown NOW!
shutdown: [pid 68434]
grogdor:/usr/local/etc# \
*** FINAL System shutdown message from grogdor@grogdor.com ***
@Grogdor
Grogdor / htdigest.sh
Created September 21, 2015 05:26
create htpasswd
#!/bin/sh
user=$1
realm=$2
pass=$3
hash=`echo -n "$user:$realm:$pass"| md5 | cut -b -32`
echo "$user:$realm:$hash"
@Grogdor
Grogdor / tsBattleBanner.sh
Last active November 8, 2015 23:37
TeamSpeak banner with upcoming CW battles
#!/bin/sh
#
# Copyright (c) 2015, Grogdor.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
@Grogdor
Grogdor / Code.gs
Created June 13, 2015 16:27
WICKD Alley of Fame for VK campaign with priorities, graphs, daily updates
function encode_utf8( s ){
return unescape( encodeURIComponent( s ) );
}
function get_csv() {
var url = 'http://www.kgmonteith.com/alleyoffame/alley.0.js';
var response = UrlFetchApp.fetch(url);
Logger.log( "RESPONSE " + response.getResponseCode());
var data = encode_utf8(response.getContentText().toString());
return data // as text
@Grogdor
Grogdor / Code.gs
Created June 13, 2015 16:25
[FUSON] IS-5 Campaign
var appID = ""; // from https://na.wargaming.net/developers/applications/
var clanID = 1000005063; // [FUSON]
function getClanMembers() {
var url = 'https://api.worldoftanks.com/wot/clan/info/?application_id=' + appID + '&clan_id=' + clanID;
var response = UrlFetchApp.fetch(url);
var json = response.getContentText();
var raw = JSON.parse(json);
@Grogdor
Grogdor / rtorrent
Last active January 15, 2023 16:57
rtorrent FreeBSD startup rc.d service script tmux user
#!/bin/sh
#
# $FreeBSD$
#
# Runs as unprivileged user "rtorrent"
# Lives in "tmux" (like "screen") because rtorrent can't daemonize itself
# To access rtorrent client that's in the tmux: su - rtorrent && tmux attach
# To detach the tmux and leave rtorrent running: Ctrl-B then D
# nice'd default +10 step to make it go easy on the machine
# Don't forget to put rtorrent_enable="YES" in your /etc/rc.conf