Skip to content

Instantly share code, notes, and snippets.

bazbt3 bazbt3

Block or report user

Report or block bazbt3

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bazbt3
bazbt3 / Pythonista six module winreg bug.txt
Last active Feb 1, 2018
Pythonista's `six` module bug: @thrrgilag's fix/workaround after my pain!
View Pythonista six module winreg bug.txt
('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
bazbt3 / PigPen_traceback_from_Pythonista
Created Jan 31, 2018
PNUTpy 0.2.2 breaks at `import pnutpy` - traceback attached
View PigPen_traceback_from_Pythonista
```
Traceback (most recent call last):
File "/var/containers/Bundle/Application/6C68ED93-06A2-4F12-AF56-3B398F5CC8A4/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/site-packages/six.py", line 127, in __getattr__
_module = self._resolve()
File "/var/containers/Bundle/Application/6C68ED93-06A2-4F12-AF56-3B398F5CC8A4/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/site-packages/six.py", line 111, in _resolve
return _import_module(self.mod)
File "/var/containers/Bundle/Application/6C68ED93-06A2-4F12-AF56-3B398F5CC8A4/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/site-packages/six.py", line 78, in _import_module
__import__(name)
ModuleNotFoundError: No module named 'winreg'
@bazbt3
bazbt3 / secretsantagiftchooser.py
Last active Nov 29, 2017
Secret Santa gift chooser
View secretsantagiftchooser.py
# 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
bazbt3 / PigPen_v0.0000001.py
Last active Oct 28, 2017
Simple Python code failing with the 'secrettoken' variable
View PigPen_v0.0000001.py
# 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 = tokenfile.read()
# print secrettoken
pnutpy.api.add_authorization_token(secrettoken)
@bazbt3
bazbt3 / PnutMondayIDEAS.md
Last active Apr 8, 2017
Odd ideas for the 1st pnut.io #ThemeMonday
View PnutMondayIDEAS.md

#PnutMondayIDEAS

(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
bazbt3 / rubyenvssuck.md
Created Dec 2, 2016
Ruby environment managers suck
View rubyenvssuck.md

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 App.net 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 http://www.ayadn-app.net/
  2. Texapp by ADN's @doctorlinguist (Floodgap Software) - at http://www.floodgap.com/software/texapp/ - incidentally the maintainer of the very excellent TenFourFox browser for older Macs - at http://www.floodgap.com/software/tenfourfox/

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

@bazbt3
bazbt3 / ADN_Wiki_refining.md
Last active Jan 26, 2016
Refining the App.net Wiki: Ideas
View ADN_Wiki_refining.md

Triaging:

What, why:

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

How:

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

View Adventure-map.pdf
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bazbt3
bazbt3 / refresh_Tmux_windows_2
Created Nov 8, 2014
I want to refresh all windows & panes in a Tmux session. Stumped. (Followup.)
View refresh_Tmux_windows_2
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/ayadn_run.sh - calls up a Tmuxinator file,
2. ~/.tmuxinator/ayadn.yml - which starts a Tmux session and in turn calls up
3. ~/Documents/ayadn_shell.sh - the shell script menu running inside the Tmux session.
ayadn_shell.sh:
@bazbt3
bazbt3 / refresh_Tmux_windows
Created Nov 6, 2014
I want to refresh all windows & panes in a Tmux session. Stumped.
View refresh_Tmux_windows
# ~/Documents/ayadn_shell.sh
#
# 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
You can’t perform that action at this time.