Matthew Nielsen SLC.rb - April 23, 2019
This file contains 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
# 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 |
This file contains 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 <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; |
This file contains 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 | |
# 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 |
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) |
This file contains 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
// 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 | |
{ |
This file contains 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 | |
# 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" |
This file contains 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
$ 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 |
This file contains 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
# 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. | |
# |
This file contains 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
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 |