Skip to content

Instantly share code, notes, and snippets.

View Dygear's full-sized avatar
🚀
Ready to Go!

Mark Tomlin Dygear

🚀
Ready to Go!
View GitHub Profile
@Dygear
Dygear / wiegand.c
Created May 30, 2020 20:04 — forked from hsiboy/wiegand.c
Wiegand API for Raspberry Pi
/*
* Wiegand API Raspberry Pi
* By Kyle Mallory All rights reserved.
* 12/01/2013
* Based on previous code by Daniel Smith (www.pagemac.com) and Ben Kent (www.pidoorman.com)
* Depends on the wiringPi library by Gordon Henterson: https://projects.drogon.net/raspberry-pi/wiringpi/
*
* This is linked with -lpthread -lwiringPi -lrt
*
* The Wiegand interface has two data lines, DATA0 and DATA1. These lines are normall held
@Dygear
Dygear / failed.txt
Last active January 15, 2022 21:58
Deno ARM64 build (Raspberry Pi OS 64Bit)
pi@deno:~ $ git clone --recurse-submodules https://github.com/denoland/deno.git
Cloning into 'deno'...
remote: Enumerating objects: 41525, done.
remote: Total 41525 (delta 0), reused 0 (delta 0), pack-reused 41525
Receiving objects: 100% (41525/41525), 22.54 MiB | 12.15 MiB/s, done.
Resolving deltas: 100% (31368/31368), done.
Submodule 'std/wasi/testdata' (https://github.com/khronosproject/wasi-test-suite.git) registered for path 'std/wasi/testdata'
Submodule 'deno_third_party' (https://github.com/denoland/deno_third_party.git) registered for path 'third_party'
Cloning into '/home/pi/deno/std/wasi/testdata'...
remote: Enumerating objects: 251, done.
@Dygear
Dygear / catalog.php
Created June 28, 2021 20:11
Trunk-Recorder Convert JSON files into SQLite database. (Tested with PHP8 Homebrew on M1 Mac Mini).
#!/opt/homebrew/bin/php
<?php
namespace MimoSDR;
use \DateTime as DateTime;
use \Generator as Generator;
use \DirectoryIterator as DirectoryIterator;
use \UnexpectedValueException as UnexpectedValueException;
use \PDO as PDO;
define('SQL_CREATE_TABLE', <<<SQL
@Dygear
Dygear / output.md
Created July 13, 2021 19:00
Trunk-Recorder 4.0 Beta ARM64 Raspberry Pi OS
pi@ADS-B:~ $ git clone https://github.com/robotastic/trunk-recorder.git ~/trunk-recorder/
Cloning into '/home/pi/trunk-recorder'...
remote: Enumerating objects: 9778, done.
remote: Counting objects: 100% (1078/1078), done.
remote: Compressing objects: 100% (639/639), done.
remote: Total 9778 (delta 707), reused 747 (delta 424), pack-reused 8700
Receiving objects: 100% (9778/9778), 4.28 MiB | 10.53 MiB/s, done.
Resolving deltas: 100% (6931/6931), done.
pi@ADS-B:~ $ cd trunk-recorder/
@Dygear
Dygear / syslog
Created January 11, 2022 14:04
Syspend OOMK Loop
Jan 10 02:08:08 pop-os wpa_supplicant[829]: nl80211: deinit ifname=p2p-dev-wlp0s20 disabled_11b_rates=0
Jan 10 02:08:08 pop-os systemd[1]: Reached target Sleep.
Jan 10 02:08:08 pop-os systemd[1]: Starting Suspend...
Jan 10 02:08:08 pop-os systemd-sleep[9821]: Suspending system...
Jan 10 02:08:08 pop-os kernel: [10770.009647] PM: suspend entry (s2idle)
Jan 10 02:08:08 pop-os kernel: [10770.026466] Filesystems sync: 0.016 seconds
Jan 10 02:08:08 pop-os wpa_supplicant[829]: nl80211: deinit ifname=wlp0s20f3 disabled_11b_rates=0
Jan 10 02:08:28 pop-os kernel: [10770.145168] Freezing user space processes ...
Jan 10 02:08:28 pop-os kernel: [10790.153255] Freezing of tasks failed after 20.007 seconds (2 tasks refusing to freeze, wq_busy=0):
Jan 10 02:08:28 pop-os kernel: [10790.153330] task:io_worker state:D stack: 0 pid: 3187 ppid: 1619 flags:0x00004004
@Dygear
Dygear / Audio.php
Last active May 16, 2022 00:16
MimoSDR Upload Files
<?php
namespace MimoSDR;
use \DateTimeZone;
use \TTG\DateTime;
use \TTG\Files;
class Audio
{
const SQL_CREATE =<<<SQL
CREATE TABLE sdr_sites (
@Dygear
Dygear / ESAR.c
Last active April 10, 2025 14:00 — forked from cygeus/ESAR.c
ESAR - Extraordinarily Simple AIS Receiver
/*
* source: https://www.rtl-sdr.com/esar-extraordinarily-simple-ais-receiver-written-in-c/
* code originally written for MS Visual Studio by Richard Gosiorovsky,
* but slightly adapted to compile using clang on Linux.
*
* compile:
* $ gcc -Wall -Werror -o ESAR ESAR.c
*
* run:
* $ rtl_tcp -f 162e6 -s 300000 -a 127.0.0.1 -p 2345 -g 48.0
@Dygear
Dygear / google_login.php
Last active July 18, 2022 12:01
Google OAuth Login Flow
<?php
if (isset($_GET['logout']))
{
session_unset();
header('Location: /');
return;
}
define('client_id', 'CLIENT_ID');
define('redirect_uri', 'THIS_FILES_URL_ON_INTERNET');
@Dygear
Dygear / example.rs
Created July 30, 2022 07:03
Primatives taking a slice would be cool.
/**
* # Motion Packet
* The motion packet gives physics data for all the cars being driven. There is additional data for the car being driven with the goal of being able to drive a motion platform setup.
* N.B. For the normalised vectors below, to convert to float values divide by 32767.0f – 16-bit signed values are used to pack the data and on the assumption that direction values are always between -1.0f and 1.0f.
* Frequency: Rate as specified in menus
* Size: 1464 bytes
* Version: 1
*/
#[derive(Debug, Clone, Copy)]
pub struct CarMotion
@Dygear
Dygear / qFlipper 1.1.3 - 0.64.3
Last active September 2, 2022 07:15
qflipper update logs
262 [APP] qFlipper version 1.1.3 commit f9bd612e 2022-08-17T10:23:02
262 [APP] OS info: Pop!_OS 22.04 LTS 22.04 5.19.0-76051900-generic
285 [REG] Detected new device: VID_0x483:PID_0xdf11
536 [DBG] Device reported transfer size: 1024
538 [DBG] Bytes uploaded: 32 100%
538 [DBG] Upload has finished.
540 [REG] Registering the device
540 [BKD] Current device changed to "Otu"
559 [UPD] Fetched update information from https://update.flipperzero.one/qFlipper/directory.json
559 [UPD] Fetched update information from https://update.flipperzero.one/firmware/directory.json