This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Eddystone and iBeacon example code for Puck.js 1.92 or above | |
// How to use: paste into the web IDE, adjust to your needs, and upload to your puck. | |
// Setup which type of advertising you wish to make, Eddystone, iBeacon, or both. Uncomment ONLY ONE. | |
function doAdvertising() { | |
doEddystone(); //By default, we advertise eddystone only. | |
//doiBeacon(); | |
//advertiseBoth(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "stdafx.h" | |
#include <stdio.h> | |
#include <time.h> | |
#include <chrono> | |
#include <thread> | |
#include <Windows.h> | |
void SetColorAndBackground(int ForgC, int BackC = 0) { | |
WORD wColor = ((BackC & 0x0F) << 4) + (ForgC & 0x0F); | |
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), wColor); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <time.h> | |
#include <stdlib.h> | |
#include <windows.h> | |
#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004 | |
const char* RESET = "\x1B[0m"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Script to generate skeleton config for Cisco IAD2432-24FXS allowing it to switch 24 telephone ports locally. Extensions numbered 201-224. Apply this on top of a base (fresh from reset state) config to get phones to talk to each other. | |
for i in `seq 1 24`; | |
do | |
echo "voice-port 2/$(echo $(($i-1)))" #port 2/0 | |
echo "ren 3" | |
echo "cptone gb" | |
echo "station-id number $(echo $(($i+200)))" #station-id 201 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MikroTik (RouterOS) script for automatically setting DNS records | |
# for clients when they obtain a DHCP lease. | |
# | |
# author SmartFinn <https://gist.github.com/SmartFinn> | |
# based on https://github.com/karrots/ROS-DDNS | |
# modified 20200412 a-a to allow multiple IPs per host | |
# modified 20200417 a-a, add functionality to strip anything after hostname, add variables to control optional features. | |
# Set to "true" if adding multiple IP addresses to the same hostname is acceptable, ie for clients with wireless and a wire. | |
:local allowRoundRobin "true"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# | |
# Script to send POCSAG messages on multiple known frequencies to specified RIC | |
# This could be useful where the RIC is known, the frequency is unknown but | |
# suspected to be a former UK commercial paging network, but all other | |
# paramaters such as baud raud or inversion are unknown. | |
# | |
# You should be using this in an RF test chamber to avoid voilating the law. | |
# But if you're playing with pagers, you presumably already known this :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <gfxfont.h> | |
#include <Adafruit_SPITFT_Macros.h> | |
#include <Adafruit_SPITFT.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_GrayOLED.h> | |
/* ESP Weather Display using an EPD 2.7" Display, obtains data from Open Weather Map, decodes it and then displays it. | |
#################################################################################################################################### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Force Juniper SRX110H2 to accept VDSL PIC firmware from Juniper jfirmware 17 release (For SRX300 series?) | |
# it might work, it might not. do this at your own risk etc. i think it rolls back. haven't tried lol. | |
# Testing using latest 17.4 release specifically from https://support.juniper.net/support/downloads/?p=junos-srx#sw. | |
# At time of writing, "latest" was jfirmware-srxsme-17.4R3.16-signed.tgz - copy your shit to a fat32 usb | |
# Make usb mountpoint (if you haven't already) | |
root@% mkdir /var/tmp/usb | |
# Mount the USB | |
root@% mount_msdosfs /dev/da0s1 /var/tmp/usb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=POCSAG UDP Relay | |
After=network-online.target | |
Wants=network-online.target systemd-networkd-wait-online.service | |
[Service] | |
Type=simple | |
ExecStart=/usr/bin/python3 /usr/local/bin/pocsag-udp-relay.py | |
StandardInput=tty-force | |
Restart=on-failure |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[General] | |
DisplayServer=wayland | |
[Wayland] | |
# Path of the directory containing session files | |
SessionDir=/usr/share/wayland-sessions | |
# Path of script to execute when starting the desktop session | |
SessionCommand=/usr/share/sddm/scripts/wayland-session |
OlderNewer