Skip to content

Instantly share code, notes, and snippets.

Looking for a new opportunity

James Brown jbrown123

Looking for a new opportunity
View GitHub Profile
jbrown123 / mylib.scad
Created Feb 9, 2020
A library of openscad functions that I frequently use in my designs
View mylib.scad
* MyLib.scad
* A bunch of openscad functions that I might need from time to time in various projects
* Usage: use <mylib.scad>;
* Version: 20200209
* Copyright (c) 2011-2020 by James H. Brown
jbrown123 / uta-wifi.user.js
Created Aug 15, 2019
Auto login to UTA (Utah Transit Authority) WiFi - ticks the accept conditions checkbox, then clicks the connect button
View uta-wifi.user.js
// ==UserScript==
// @name Auto login to UTA WiFi
// @namespace
// @version 0.1
// @description Check the box and press the button on the UTA wifi page
// @author James Brown
// @match
// @grant none
// @require
// ==/UserScript==
jbrown123 /
Created Jul 1, 2019
How to use PuTTY with github on Windows

How to use PuTTY with github on Windows

To make things easier, we can tell git to use the PuTTY tools rather than the built in ssh client. The PuTTY tools include an identity manager and an SSH replacement.

Follow these four steps:

  1. Download and install PuTTY using the MSI installer package from the PuTTY download page. Alternately, you can just get the "PLink" and "Pageant" executables from the same page and save them somewhere in your path.

  2. Add a new user or system environment variable:

  • Press Windows+R and enter sysdm.cpl
jbrown123 /
Created Mar 21, 2019
A simple recurring alarm clock written in Perl (does not require any packages, just plain perl). This version is specific to Windows but could easily be converted to other platforms.
#!/usr/bin/env perl
# a (very simple) recurring alarm clock for windows
# easily converted to any other platform by replacing the call to the windows msg tool
# all data is stored in the file itself (in the __DATA__ section at the bottom)
# this is written in pure perl, no packages are required
# under windows I suggest using the ActiveState wperl interpreter to launch the alarm clock
# that prevents you from having a command processor hanging around just to run the alarm clock
# the unfortunate side effect is that you have to kill it using task manager since it never exits
jbrown123 / unsplash_random.html
Created Mar 20, 2019
Unsplash randomly rotating images
View unsplash_random.html
<title>Unsplash images</title>
// randomly cycle through unsplash images in the browser window every 5-30 seconds
// this works great in full screen (F11) mode on wall monitors as random artwork
// tested on Chrome; should work on most modern browsers but don't blame me if it doesn't
// I used info from the following sites to create this
jbrown123 /
Last active Apr 21, 2020
Reference bookmarklet - generate a string containing the page title, URL and any selected text

Reference bookmarklet

This bookmarklet will grab 2 or 3 bits of info from the currently viewed webpage and put them into an 'alert' so you can copy & paste into another document.

It should work in any desktop browser (chrome, firefox, ect.) on any OS but I've only personally tested it in Chrome on Windows.

You can press either enter or escape after copying the text. It doesn't make any difference which one you use.

For example, the above URL points to the bookmarklet entry on Wikipedia. If you used the reference bookmarklet on that page it would return the following:

jbrown123 / initialization.sql
Last active Jul 13, 2020
Creating arbitrary-depth recursive queries in SQLITE (works for any SQL compliant system) using CTEs (common table expressions)
View initialization.sql
CREATE TABLE users (name, cn, title, manager);
-- create a CTE (common table expression)
-- think of this as creating a temporary table that only exists during this query
-- works somewhat like CREATE TEMPORARY TABLE bosspath(cn, path)
WITH RECURSIVE bosspath(cn,path) AS
jbrown123 / US Zip Codes to Lat Lon from 2016 Government Census Data
Last active May 5, 2017
All US zip codes (technically "five digit ZIP code tabulation area census codes") with their corresponding latitude and longitude coordinates. Positive values = North or East; Negative values = South or West. Comma delimited for easy import. Source: Built with the following commands: unzip …
View US Zip Codes to Lat Lon from 2016 Government Census Data
jbrown123 /
Last active Nov 6, 2018
A simple bookmarklet to help clip a webpage to a google doc

Bookmarklet to clip webpages to google docs

Below is a simple bookmarklet (see to make it easier to capture the content of a webpage into a google doc. This is similar (but much simpler and less functionality) to Evernote Web Clipper (see

This bookmarklet will copy the URL and the title of the current page. Since most browsers forbid directly manipulating the clipboard contents, it makes a copy by creating a pop-up with all the data highlighted and asks the user to press control-c (the keyboard copy shortcut) and then enter. Once you press enter it will create a new google document for you in a new tab. You can simply press control-v (the keyboard paste shortcut) to put in the URL and title.

If you press escape or hit 'cancel' in the popup, nothing happens and you return to your original webpage.

If you happen to have some text selected on the current webpage, this will be appended to the end of the pasted block. However,

jbrown123 / reveal per-slide theme override.js
Last active May 11, 2019
Reveal.js - per-slide theme override using data-theme attribute
View reveal per-slide theme override.js
// the code below can be added to the end of your Reveal slide deck to implement
// per slide theme setting via the data-theme attribute
// I put this in right below the call to Reveal.initialize()
// the code is smart enough to restore the previous default theme
// (or slide specific theme) as you move forward and backward
// it also takes into account vertical slide stacks with a data-theme
// attribute on the outer <section> tag and allows individual vertical
// slides to specify their own override
You can’t perform that action at this time.