Skip to content

Instantly share code, notes, and snippets.

View jegger's full-sized avatar

Dominique Burnand jegger

View GitHub Profile
@jegger
jegger / fix-osx-ssl-cert-error.txt
Created October 22, 2015 16:48
Certificate validation error on mac osx pyopenssl (twisted)
# When you get an error like
# ('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')
# when using twisted, autobahn, etc...
# on osx
# than you may have to update your openssl
# Do this by using brew:
# (install brew)
brew update
brew install openssl
def validateEmail(self, email):
"""This function validates the mail address given
in the argument: email.
"""
if len(email) > 7:
if re.match("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$", email) != None:
return True
return False
@jegger
jegger / sign.sh
Created April 19, 2017 15:32
macOS kivy pyinstaller sign
####
# Usage:
# build.sh kivy-app.sh
#
# What does this?:
# This signs kivy executables built with pyinstaller for macOS.
#
####
if [ $# -eq 0 ]
@jegger
jegger / pygraphviz-install
Created July 8, 2019 06:34
pygraphviz installation into virtualenv mac
# If you run into the the following error while installing pygraphviz into a virtualenv
# (on macOs, python3)
#
# pygraphviz/graphviz_wrap.c:2987:10: fatal error: 'graphviz/cgraph.h' file not found
# #include "graphviz/cgraph.h"
# ^~~~~~~~~~~~~~~~~~~
# 1 error generated.
# error: command 'clang' failed with exit status 1
# - Install graphviz via brew