Skip to content

Instantly share code, notes, and snippets.

View xunker's full-sized avatar

Matthew Nielsen xunker

View GitHub Profile
@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 / 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 / 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 / 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 / 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 / split_drillfile.rb
Last active July 2, 2018 17:32
Split pcb2gcode drill files by bit size
#!/usr/bin/env ruby
#
# usage: split_drillfile.rb [<drill.ngc>]
#
# Reads a pcb2gcode drill file and creates individual files for each
# drill bit size. It will duplicate the preamble/postable between files.
# This is for programs like Universal Gcode Sender / UGS that do not let you
# change bits while streaming is paused because they do not allow you to move
# the head or reset the Z-axis while file streaming is paused.
#
@xunker
xunker / pcb2gcode.sh
Last active July 3, 2018 06:11
pcb2code for Fritzing RS-274x files
#!/bin/bash
# IMPORTANT: Need to use pcb2gcode from git head, not the 2-year-old vesion 1.3.2 from homebrew or apt-get
# On Macos: brew install --HEAD pcb2gcode
# FILE_PREFIX="595 shift register demo"
# FILE_PREFIX="tp4056 charger carrier with ground copy"
# FILE_PREFIX="Sparkfun Moto_Bit hardware pull PTH"
# FILE_PREFIX="3.3v regulator"
FILE_PREFIX="3.3v regulator double sided"
@xunker
xunker / eclipse.rb
Last active August 19, 2017 23:21
Ruby eclipse simulator and sun/moon position visualizer using Gosu
#!/usr/bin/env ruby
#
# Visualizer to show sun and moon positions, give a certain time and position on
# the earth.
#
# Uses "gosu" so you will need to install the following libraries:
# * gosu (brew install gosu on macos)
# * sdl2 (brew install sdl2 on macos)
#
# Uses gems:
@xunker
xunker / slaskstatus.sh
Last active June 26, 2017 17:55
Automatically set your Slack status emoji based on what WiFi network you are connected to
#!/bin/bash
# Originally based on https://gist.github.com/samervin/621fcde93d28346ec5dbab4466b51d45
slacktoken="YOUR_SLACK_TOKEN"
apiurl="https://slack.com/api/users.profile.set?token="$slacktoken"&profile="
# https://stackoverflow.com/questions/4481005/get-wireless-ssid-through-shell-script-on-mac-os-x
# This will probably only work on Mac OS 10.10+.
ssid=$(/usr/sbin/networksetup -getairportnetwork en0 | cut -c 24-)
echo $ssid
if [ "$ssid" = "WORK_NETWORK_NAME" ]; then
@xunker
xunker / n-gon_around_circle.scad
Last active November 8, 2016 23:14
Drawing an N-gon around a circle using OpenSCAD
/*
Drawing an N-gon around a circle using OpenSCAD
https://gist.github.com/xunker/daabf70dbb8e990077d3a1a11d1e06dd
Matthew Nielsen - github.com/xunker
Math credit: http://mathcentral.uregina.ca/QQ/database/QQ.09.06/s/cliff1.html
*/
/* Diameter of the circle around which the n-gon will be built. */