Skip to content

Instantly share code, notes, and snippets.

@tomkcook
tomkcook / gist:6047dd535b1ca093d4d6e0f9d557c3f1
Created May 26, 2026 13:51
Pyenv shim creation failure
This file has been truncated, but you can view the full file.
+(./test.sh:6): pip install pytest
+(/home/tkcook/.pyenv/shims/pip:5): program=pip
+(/home/tkcook/.pyenv/shims/pip:7): export PYENV_ROOT=/home/tkcook/.pyenv
+(/home/tkcook/.pyenv/shims/pip:7): PYENV_ROOT=/home/tkcook/.pyenv
+(/home/tkcook/.pyenv/shims/pip:8): SHIM_PATH=/home/tkcook/.pyenv/shims
+(/home/tkcook/.pyenv/shims/pip:9): [[ /home/tkcook/.pyenv/shims != /home/tkcook/\.pyenv/shims ]]
+(/home/tkcook/.pyenv/shims/pip:12): exec /home/tkcook/.pyenv/libexec/pyenv exec pip install pytest
+(/home/tkcook/.pyenv/libexec/pyenv:23): enable -f /home/tkcook/.pyenv/libexec/../libexec/pyenv-realpath.dylib realpath
+(/home/tkcook/.pyenv/libexec/pyenv:30): '[' -z '' ']'
++(/home/tkcook/.pyenv/libexec/pyenv:32): type -P readlink
import Part
from pivy import coin
class Molecule:
def __init__(self, obj):
''' Add two point properties '''
obj.addProperty("App::PropertyVector","p1","Line","Start point")
obj.addProperty("App::PropertyVector","p2","Line","End point").p2=FreeCAD.Vector(5,0,0)
obj.Proxy = self
@tomkcook
tomkcook / test.py
Created May 14, 2020 08:48
Test code for FreeCAD highlighting and selection
class Molecule:
def __init__(self, obj):
''' Add two point properties '''
obj.addProperty("App::PropertyVector","p1","Line","Start point")
obj.addProperty("App::PropertyVector","p2","Line","End point").p2=FreeCAD.Vector(5,0,0)
obj.Proxy = self
def onChanged(self, fp, prop):
pass
@tomkcook
tomkcook / app.py
Created March 20, 2018 15:50
Authenticate against Sharepoint using flask-oauthlib (not yet working - see comments)
# Notes
# - All IDs are GUIDs
# - You get the client ID and the client secret by registering your app. You can
# do this through sharepoint online or through Azure AD.
# - Getting an access token goes in two steps; you request an authorization token from Sharepoint,
# then an access token from ACS.
# - Getting the authorization token from Sharepoint works (returned as a request to
# /login?code=XXX )
# - Getting the access token doesn't work. Apparently because Sharepoint and ACS disagree about
# what is a valid client ID. Sharepoint wants just the app's GUID, while ACS wants to see