Skip to content

Instantly share code, notes, and snippets.

View xunker's full-sized avatar

Matthew Nielsen xunker

View GitHub Profile
@xunker
xunker / whats_new_in_ruby_2.7.md
Created April 24, 2019 16:49
What's new in Ruby >= 2.6.3, 2.7, and 3.0 - SLC.rb - April 23, 2019

What's new in Ruby >= 2.6.3, 2.7, and 3.0

Matthew Nielsen SLC.rb - April 23, 2019

2.6.3

Support for new Japanese Era Characters

@xunker
xunker / pocsag_fortune.sh
Last active May 4, 2024 15:18
Send text to POCSAG pager using rpitx
# Send a page to a POCSAG pager using rpitx (https://github.com/F5OEO/rpitx).
# Place this script in the root directory of the rpitx repo when you check it out.
#
# Requires the `fortune` program to be installed: `sudo apt-get install fortune`
#
# In default config, set to transmit to an Apollo AL-A25 pager.
CAPCODE="0268778A"
FREQUENCY=157740000
BAUD=512
FORTUNE=$(fortune | tr '\n' ' '); echo $FORTUNE; printf "$CAPCODE:$FORTUNE" | sudo ./pocsag -f $FREQUENCY -r $BAUD
@xunker
xunker / nvme_cooler.ino
Last active February 14, 2020 16:33
test nvme cooler led code
#include <FAB_LED.h>
/*
Trinket 85: 0 => B,0
Bluefruit LE Micro: 5 => C,6
*/
// Declare the LED protocol and the port
// sk6812<C,6> strip;
// sk6812b<C,6> strip;
@xunker
xunker / get_synology_cpu_temperature.sh
Last active November 17, 2020 19:28
Get temperatures from Synology running DSM 6.x
#!/bin/bash
# Simple script to get all the values from the temperature sensors on your
# Synology device running DSM 6.x.
# Only tested on my DS415play (2 core Atom CE5335), YMMV.
#
# Sample output:
#
# $ ./get_synology_cpu_temperature.sh
# temp2 (Core 0): current 40°C, critical at 100°C
@xunker
xunker / ti_silent_700_eia_to_rs232_converter_pinout.md
Last active December 5, 2023 17:22
TI Silent 700 EIA to RS232 Converter Pinout

Used on TI Silent 745, but should work on all models with 15-pin EIA connector. As seen in my TI Silent 745 Video.

  • DB-15 female is the EIA port on the rear of the TI terminal.
  • DB-9/DE-9 is the 9-pin serial port on the back of your computer, or on your USB-to-Serial adapter
DB-15 female DB-9/DE-9 female DB-15 EIA Signal Name DB-9/DE-9 Signal Name
11 1 Data Carrier Detect (DCD) Data Carrier Detect (DCD)
13 2 Transmit Data (TD) Receive Data (RD)
12 3 Receive Data (RD) Transmit Data (TD)
@xunker
xunker / keybindings.json
Created January 13, 2023 23:39
My VS Code keybindings
// On my machine this lives in ~/Library/Application Support/Code/User/keybindings.json
[
// move editor to the right group, or create a new group to the right
{
"key": "shift+cmd+k",
"command": "workbench.action.moveEditorToRightGroup"
},
// these 3 work together so let me jump between my terminal tab and the editor group with a single key combination
{
@xunker
xunker / helloer.sh
Created December 9, 2023 01:05
Make a single MP3 audio file of all the voices from MacOS `say` command
#!/bin/bash
# set -o xtrace
# generates an MP3 file of every voice in MacOS saying the appropriate 'Hello'
# Requires ffmpeg to be install, by homebrew is preferred.
OUTPUT="everyone_hello" # extension will be added below
OUTPUT_AIFF="$OUTPUT.aiff"
OUTPUT_MP3="$OUTPUT.mp3"
@xunker
xunker / example.txt
Created February 1, 2024 20:19
Simply having an EMPTY directory will make Rails 5.2 automatically add a module namespace
$ ls app/lib/salesforce/subscriptions
ls: app/lib/salesforce/subscriptions: No such file or directory
$ rails c
> Salesforce::Subscriptions
NameError: uninitialized constant Salesforce::Subscriptions
> exit
$ mkdir app/lib/salesforce/subscriptions
$ rails c
> Salesforce::Subscriptions
=> Salesforce::Subscriptions
@xunker
xunker / integer_with_indifferent_comparison.rb
Last active March 14, 2024 22:12
Ruby IntegerWithIndifferentComparison - An experiment to show how to make an Integer-like class in Ruby without subclassing the Integer class directly
# IntegerWithIndifferentComparison
# --------------------------------
# https://gist.github.com/xunker/6c92e3fff3d81a8245caf2ee4994f884
#
# An experiment to show how to make an Integer-like class in Ruby without
# subclassing the Integer class directly.
#
# Instances of this class will behave like an Integer, but will allow direct
# equality comparison with Strings and other objects without explicit casting.
#
@xunker
xunker / cisco_2501_info.txt
Last active April 8, 2024 23:53
Cisco 2501 Router System Information, IOS 12.0(3)
This is the boot log and some other interesting information from a Cisco 2501
Router that was rescued from a junk pile at Weber State University in
April 2024. I paid $1 for it. That's all I know about it.
It appears this box was fully wiped before it was stricken from the inventory.
Kudos to the WSU techs!
==== ROM-MONITOR ====
System Bootstrap, Version 5.2(8a), RELEASE SOFTWARE