Skip to content

Instantly share code, notes, and snippets.

View bazbt3's full-sized avatar

bazbt3 bazbt3

View GitHub Profile
bazbt3 / Pythonista six module winreg bug.txt
Last active February 1, 2018 21:59
Pythonista's `six` module bug: @thrrgilag's fix/workaround after my pain!
('pnut developers' chatroom; PigPen app output)
@bazbt3: [u:175+f+F]
2018-02-01 16:06:48+00:00
Did any of you have issues with Python not working correctly yesterday? PIL failed to import, but works today. pillow failed but works today. The PNUTpy library fails to import but only for pythonista.
@33MHz: [u:1+f+F]
2018-02-01 16:08:17+00:00
@bazbt3 PNUTpy is working elsewhere? (it was just recently updated)
bazbt3 / PigPen_traceback_from_Pythonista
Created January 31, 2018 14:31
PNUTpy 0.2.2 breaks at `import pnutpy` - traceback attached
Traceback (most recent call last):
File "/var/containers/Bundle/Application/6C68ED93-06A2-4F12-AF56-3B398F5CC8A4/", line 127, in __getattr__
_module = self._resolve()
File "/var/containers/Bundle/Application/6C68ED93-06A2-4F12-AF56-3B398F5CC8A4/", line 111, in _resolve
return _import_module(self.mod)
File "/var/containers/Bundle/Application/6C68ED93-06A2-4F12-AF56-3B398F5CC8A4/", line 78, in _import_module
ModuleNotFoundError: No module named 'winreg'
bazbt3 /
Last active November 29, 2017 19:03
Secret Santa gift chooser
# Secret Santa gift chooser
# @bazbt3
import random
items = ["suits", "flange", "nipple", "socket", "lubricant", "gusset", "spigot", "Cairo!"]
print("initial list\n", items)
i = 0
for item in items:
i += 1
while i != 0:
bazbt3 /
Last active October 28, 2017 13:15
Simple Python code failing with the 'secrettoken' variable
# Pasting the secret access token works at `pnutpy.api.add_authorization_token(secrettoken)`. HOWEVER I want to remove my access token from this code to ***allow sharing.***
import pnutpy
import console
tokenfile = open("secrettoken.txt", "r")
secrettoken =
# print secrettoken
bazbt3 /
Last active April 8, 2017 07:28
Odd ideas for the 1st #ThemeMonday


(ASSUMING it gets picked for April 10th.)

  • some peanuts
  • pack of peanuts
  • peanut plant
  • peanut plant leaf
  • Peanuts cartoon character
  • retired political figures with peanut affiliations
  • peanut cuisine
bazbt3 /
Created December 2, 2016 21:03
Ruby environment managers suck

A few days ago the Felix iOS app's push server finally went dark, so I decided I needed to really accelerate my computing hobby. There's no way I'll ever be able to produce as polished an app as Felix was, but I have urges which have lain dormant for 30 years. Or are they itches?

The time was right to install a command line client for on my venerable Lappy486. Maybe an odd choice for a first step given the above? I've attempted to rationalise it by guessing the command line gets me closer to the action than a swipe or a tap - may help me understand an app's 'mechanics' more.

As far as I know there are 2 clients available:

  1. Ayadn by ADN's @ericd - at
  2. Texapp by ADN's @doctorlinguist (Floodgap Software) - at - incidentally the maintainer of the very excellent TenFourFox browser for older Macs - at

I make the decision to install Ayadn because it looks the prettiest, the installation ins

bazbt3 /
Last active January 26, 2016 06:32
Refining the Wiki: Ideas


What, why:

There are a lot of effectively obsolete pages at the Wiki - - some in need of explicit instructions for new viewers, others requiring edits to bring them up-to-date.


I'm never ever in favour of deletions, hate broken links; we should simply work around them. But that's only my opinion.

bazbt3 / Adventure-map.pdf
Last active February 27, 2016 20:19
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
bazbt3 / refresh_Tmux_windows_2
Created November 8, 2014 16:11
I want to refresh all windows & panes in a Tmux session. Stumped. (Followup.)
In essence I want a shell script menu option to refresh Tmux windows & panes.
(There is no user tmux.conf file - I use Tmuxinator to setup Tmux {it's easier} - thus it's not going to be as easy as this Linux noob thinks!)
I have 3 files (none yet in a public repo):
1. ~/Documents/ - calls up a Tmuxinator file,
2. ~/.tmuxinator/ayadn.yml - which starts a Tmux session and in turn calls up
3. ~/Documents/ - the shell script menu running inside the Tmux session.
bazbt3 / refresh_Tmux_windows
Created November 6, 2014 12:54
I want to refresh all windows & panes in a Tmux session. Stumped.
# ~/Documents/
# I want to refresh all windows & panes running in the currently-running Tmux session.
# I'm not Linux- or Tmux- literate (2 weeks in.)
# Menu option (item 8, not implemented) in the partial code below doesn't work.
# I intended this code to close Tmux and then re-open it - mirroring the manual method I use currently.
# "Tmux kill-session" exits to the command line
# "mux ayadn" starts Tmuxinator and sets up a Tmux session using ~/.tmuxinator/ayadn.yml