Skip to content

Instantly share code, notes, and snippets.

View bkram's full-sized avatar

Mark de Bruijn bkram

View GitHub Profile
diff --git a/web/js/3las/3las.js b/web/js/3las/3las.js
index 3ec297f..97c8ff0 100644
--- a/web/js/3las/3las.js
+++ b/web/js/3las/3las.js
@@ -120,19 +120,27 @@ var _3LAS = /** @class */ (function () {
this.Fallback.OnSocketConnect();
this.Fallback.Init(this.WebSocket);
};
- _3LAS.prototype.OnSocketDisconnect = function () {
- this.Logger.Log("Lost connection to server.");
@bkram
bkram / flash.sh
Last active June 1, 2024 08:15
Update tool ESP32 TEF6686 Development
#!/usr/bin/env bash
# Define possible esptool commands
ESPTOOL_CANDIDATES=(esptool esptool.py)
ESPTOOL=""
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
pcm.hifiberry {
type softvol
slave {
pcm {
type plug
slave {
pcm "hw:0"
format unchanged
channels unchanged
rate unchanged
#!/usr/bin/env python3
"""
This script sets the frequency and pre-emphasis values for a device using a serial interface.
It takes a frequency argument in MHz and an optional pre-emphasis argument (default: 1).
The script sends commands to the device via the specified serial port to set the frequency
and pre-emphasis values.
Command line arguments:
@bkram
bkram / fm-dx-console.js
Last active February 16, 2024 14:04
fm-dx-console.js
// (c) Bkram
// Console client for https://github.com/NoobishSVK/fm-dx-webserver
// No audio (yet)
// Import necessary libraries
const blessed = require('blessed'); // Library for creating terminal-based UI
const WebSocket = require('ws'); // WebSocket library for communication
const argv = require('minimist')(process.argv.slice(2)); // Library for parsing command-line arguments
// Check if required arguments are provided
@bkram
bkram / FM-DX Webserver linux installation.md
Last active February 17, 2024 08:49
FM-DX Webserver linux installation

FM-DX Webserver linux installation

In this small guide we will be installing FM-DX Webserver.

This will be executed on a Raspberry Pi 2, but will be useful/usable for most other Debian derived distributions.

We expect that we have set up a fresh installation and we have a user named fmdx with sudo permissions available to run our commands.

You will need a Linux supported (usb) audio device and a FM-DX Webserver supported tuner.

@bkram
bkram / frequencies.csv
Last active September 3, 2023 09:40
Scanner Frequencies Bearcat UBC125XLT
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 8 columns, instead of 1. in line 1.
Channel,Name,Frequency,Modulation,CTCSS/DCS,Delay,Lockout,Priority
# Bank 1
1,CB 1,26.9650,FM,none,2,no,no
2,CB 2,26.9750,FM,none,2,no,no
3,CB 3,26.9850,FM,none,2,no,no
4,CB 4,27.0050,FM,none,2,no,no
5,CB 5,27.0150,FM,none,2,no,no
6,CB 6,27.0250,FM,none,2,no,no
7,CB 7,27.0350,FM,none,2,no,no
@bkram
bkram / trivy-image
Created May 17, 2022 19:49
trivy-image
#!/bin/bash
docker run --rm -v ~/trivy_cache:/root/.cache/ aquasec/trivy:latest image $1
@bkram
bkram / wifi-toggle.sh
Created January 22, 2022 16:27
openwrt disable or enable a ssid
#!/bin/sh
DISABLE_SSID="Kids"
off() {
for ssid in $(uci show wireless | grep "$DISABLE_SSID" | cut -f 1-2 -d.); do
echo Disabling "$ssid"
uci -q set "$ssid".disabled=1
uci commit
wifi reload
done
#ifdef AMIGA
#include <proto/socket.h>
#endif
#ifdef WIN32
#include <winsock2.h>
#else
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>