November 2023
-
Firebase in Node: functions is not a function
Have you seen this error when trying to use firebase.functions:
functions is not a function
This is due to a Firebase API change from their namespaced API to a modular API. Continue reading to find out how to resolve this issue.
November 2020
-
Wercker: You have reached your pull rate limit.
Have you seen this error on Wercker:
You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit"
If you are an occassional/hobby builder then a free account on Docker Hub is all you will need to resolve the issue. Read on for a step-by-step guide.
-
Wi-Fi issues with macOS Catalina
I held off upgrading my OS from Mojve to Catalina, and then I simply forgot to. Recenlty, I did the upgrade, and everything worked fine.
However, my Wi-Fi simply stopped working one day. No obvious reason why either. I tried sharing my phones data connection via USB and Bluetooth, but neither worked.
A quick search led me to the solution.
May 2020
-
Tailwind CSS + Hugo | Step 3 – Adding some basic content.
I added some basic content to the site index page tonight.
I don’t want to design the layout in isolation from the content. Real content allows me to do this piece by piece, and gives me some confidence in my approach.
It keeps me grounded to one of the reasons for doing this in the first place.
Read on and see how I added the basic content, and what I’m going to do in step 4.
April 2020
-
Tailwind CSS + Hugo | Step 2 – Create a Basic Layout
It’s been a while since Step 1 but I’ve finally come back to have a little further exploration with Tailwind.
After Step 1, I had a very very basic site in place, so I decided it’s time to create a basic layout.
I’ve decided not to be very adventurous to start-out, and so I stick with the single column layout I currently have on the site, along with three main sections of content.
-
Release: pathfinder 0.6.2
Pathfinder 0.6.2 is a minor release, with a fix that requires the filepath parameter to exist.
If the path does not exist an error is raised.
February 2020
-
Tailwind CSS + Hugo | Step 1 – Create the Theme
The first step in this process is to create a new Hugo theme.
hugo new theme tailwind-keyes
-
Tailwind CSS + Hugo
I’ve seen Tailwind CSS mentioned more than once over the past couple of years, and these mentions have always been favourable.
My web design days are fading in the distance, so I thought it might be a good idea to attempt to create a Hugo template based on tailwind.
January 2020
-
Testing with pendulum
My usual way of modifying the behaviour of
pendulum.now()
when testing has been to mock it:with mock.patch( "pendulum.now", return_value=pendulum.parse("2020-01-01 00:00:00") ): ...
However, I did something mad today, and delved into the docs and found a neater way:
with pendulum.test(pendulum.parse("2020-01-01 00:00:00")):
January 2019
-
Release: python-docraptor 1.2.3
Bugfix: explicity set.message
onDocRaptorRequestException
.
October 2018
-
Python Package – begins
Command line programs for lazy humans.
January 2018
-
Docker Compose Default Environment Variables
Use${VAR:-VALUE}
to specifyVALUE
as the default value if$VAR
is not set or is empty. -
MongoDB fdatasync: Invalid argument
TL;DR you can’t use a VirtualBox shared folder to store your MongoDB data.
December 2017
-
python-intercom is moving out
python-intercom has decided it no longer likes living with me in my mud hut in the woods, and has moved into the marble floored and velvet cushioned environs of Intercom.
February 2017
-
python-intercom 3.0
Version 3 of python-intercom has risen from it’s seat in the basement, stomped up the stairs, burst through the front door, and roared “I’M FREE!".
November 2016
-
python-intercom 3.0b3
The long drawn out “will version-3 be released” saga is coming to an end. I’ve just released 3.0b3.
September 2016
-
Password Reset on freenode
How to get a password reset email from freenode. -
Heroku run Exit Codes
For the past few years I’ve come to rely on Glenn Gillen’s plugin to get the exit code from processes executed byheroku run
. Well colour me behind the times, but Heroku resolved this issue in May 2015.
January 2016
-
How to specify where to store Let's Encrypt certificates
Rather than leaving it up to the Let’s Encrypt client to decide where to place the certificates based on the domains being passed, it’s possible to specify exactly where to store them. -
Release: python-docraptor 1.2.2
A teeny release. The default timeout has been increased from 10 to 90 seconds. -
Renewing Let's Encrypt Certificates
Now that I had my Let’s Encrypt certificates in place, I needed an automated process to renew them. This post shows the config and the commands used to achieve this. -
No post content in Jekyll index pages
When I upgraded Jekyll from 2.5 to 3, the pages that iterate oversite.posts
had no content in them. A deprecation warning points the way towards the fix.
December 2015
-
Jekyll Responsive Embed Update
An updated version of my Responsive Embed Jekyll convertor. -
Uploading a Let's Encrypt Certificate to AWS
How to upload a Let’s Encrypt certificate to AWS. -
Let's Encrypt CloudFront
Notes on how I installed a Let’s Encrypt certificate on CloudFront. -
baseliner 1.0
The Baseliner overlay now indicates it does not want to be a target of mouse events. When Baseliner is open, it’s possible to interact with the page beneath.
August 2015
-
baseliner 1.0.beta
Baseliner has reverted to client side overlay generation. The main reason for this change, is to allow Baseliner to work offline. I felt that this simple tool should not need an internet connection to work. -
python-intercom 2.1.1
Announcing version 2.1.1 of python-intercom. -
Keybase Web Identity Alert
Having a proven web identity on Keybase provides a very basic sanity check for a web site. I recently broke the deployment to this site, and it was an email from Keybase that first alerted me.
July 2015
-
Dropbox Deletion Warning
An acknowledgement of Dropbox’s nice warning email when you delete a large number of files.
May 2015
-
python-intercom 2.0.0
Announcing version 2 of python-intercom.
April 2015
-
python-intercom 2.0.beta
A couple of major issues were raised for the alpha release. The first was the lack of support for empty body responses, and the second was incorrect tracking of
changed_attributes
for resources.These are fixed in this release, and an FAQ has been added to the documentation.
March 2015
-
python-intercom 2.0.alpha
python-intercom now supports Intercom API v2 and Python 3. -
HTTPretty test hanging on Travis
nosetests that use HTTPretty don’t exit cleanly on Travis CI. An answer on Stack Overflow reveals the problem and a simple workaround. -
New Work Junction
A new co-working space has opened in Kilkenny. Read on to find out more about New Work Junction and to see some interior shots, including the lockers in the vault.
September 2014
-
GitHub Extra Border
The pedant in me spotted an extra border on the GitHub contributions page, so I described how to fix it. -
python-intercom and self fields
Intercom’s API returns aself
attribute for each resource that contains a URL to the resource. Asself
is a reserved word in Python, the question is how should python-intercom support it. -
python-intercom 0.2.13
A new release of python-intercom with support for wildcard importing. -
Jekyll Responsive Embed Converter
Rather than visiting Embed Responsively to generate the markup for responsive media containers, I describe how I wroteResponsiveEmbedConverter
to automatically convert specifc URLs into the appropriate markup. -
Calculate Age with Python
I wrote a simple function to calculate how old someone is based on their birth date, but it sucked as it was really slow. After some searching on Stack Overflow I uncovered some really elegant and fast code. -
Argument Parsing for Humans
Using theargs
library for very simple command line argument parsing in Python. -
The Magic is in The Process
-
NameError: global name 'basestring' is not defined
August 2014
-
Logging Session and Environment with airbrake-python
-
Release: python-intercom 0.2.12
-
Release: baseliner 0.9.11
November 2013
-
Release: python-intercom 0.2.10
-
Release: pathfinder 0.5.3
-
Release: python-intercom 0.2.9
-
Release: baseliner 0.9.9
September 2013
August 2013
June 2013
-
pushState and replaceState bug in Chrome
-
Ignore files when deploying from wercker
-
How to install lessc on wercker
May 2013
April 2013
-
HTTP 400 errors when using run_every in IronWorker Python
TL;DR Iron Worker passes all command line parameters as strings, so they must be cast to the appropriate type before using them. -
Release: django-methodview 0.1.2
-
Freemium Cheating
-
Django Code of Conduct
March 2013
-
Release: python-intercom 0.2.7
-
WIP: Python Markdown prettypre extension
<span class="k">def</span> <span class="nf">extendMarkdown</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">md</span><span class="p">,</span> <span class="n">md_globals</span><span class="p">)</span><span class="p">:</span> <span class="n">md</span><span class="o">.</span><span class="n">registerExtension</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="bp">self</span><span class="o">.</span><span class="n">processor</span> <span class="o">=</span> <span class="n">PreTreeprocessor</span><span class="p">(</span><span class="p">)</span> <span class="bp">self</span><span class="o">.</span><span class="n">processor</span><span class="o">.</span><span class="n">md</span> <span class="o">=</span> <span class="n">md</span> <span class="bp">self</span><span class="o">.</span><span class="n">processor</span><span class="o">.</span><span class="n">config</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">getConfigs</span><span class="p">(</span><span class="p">)</span><span class="o"><</span><span class="o">/</span><span class="n">pre</span><span class="o">></span></code></pre></div>
<span class="k">def</span> <span class="nf">extendMarkdown</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">md</span><span class="p">,</span> <span class="n">md_globals</span><span class="p">)</span><span class="p">:</span> <span class="n">md</span><span class="o">.</span><span class="n">registerExtension</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="bp">self</span><span class="o">.</span><span class="n">processor</span> <span class="o">=</span> <span class="n">PreTreeprocessor</span><span class="p">(</span><span class="p">)</span> <span class="bp">self</span><span class="o">.</span><span class="n">processor</span><span class="o">.</span><span class="n">md</span> <span class="o">=</span> <span class="n">md</span> <span class="bp">self</span><span class="o">.</span><span class="n">processor</span><span class="o">.</span><span class="n">config</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">getConfigs</span><span class="p">(</span><span class="p">)</span>
</code></pre>
-
Typeform
December 2012
November 2012
October 2012
-
codepad.org
-
Django TestCase Transaction Wrapping
def disable_transaction_methods(): from django.test.testcases import disable_transaction_methods
<span class="k">for</span> <span class="n">db</span> <span class="ow">in</span> <span class="n">connections</span><span class="p">:</span> <span class="n">transaction</span><span class="o">.</span><span class="n">enter_transaction_management</span><span class="p">(</span><span class="n">using</span><span class="o">=</span><span class="n">db</span><span class="p">)</span> <span class="n">transaction</span><span class="o">.</span><span class="n">managed</span><span class="p">(</span><span class="bp">True</span><span class="p">,</span> <span class="n">using</span><span class="o">=</span><span class="n">db</span><span class="p">)</span> <span class="n">disable_transaction_methods</span><span class="p">(</span><span class="p">)</span>
def restore_transaction_methods(): from django.test.testcases import restore_transaction_methods
<span class="n">restore_transaction_methods</span><span class="p">(</span><span class="p">)</span> <span class="k">for</span> <span class="n">db</span> <span class="ow">in</span> <span class="n">connections</span><span class="p">:</span> <span class="n">transaction</span><span class="o">.</span><span class="n">rollback</span><span class="p">(</span><span class="n">using</span><span class="o">=</span><span class="n">db</span><span class="p">)</span> <span class="n">transaction</span><span class="o">.</span><span class="n">leave_transaction_management</span><span class="p">(</span><span class="n">using</span><span class="o">=</span><span class="n">db</span><span class="p">)</span><span class="o"><</span><span class="o">/</span><span class="n">pre</span><span class="o">></span></code></pre></div>
from unittest import TestCase
class Test(TestCase):
<span class="nd">@classmethod</span> <span class="k">def</span> <span class="nf">class_setup</span><span class="p">(</span><span class="bp">cls</span><span class="p">)</span><span class="p">:</span> <span class="n">disable_transaction_methods</span><span class="p">(</span><span class="p">)</span> <span class="c1"># ... import test fixtures</span> <span class="nd">@classmethod</span> <span class="k">def</span> <span class="nf">class_teardown</span><span class="p">(</span><span class="bp">cls</span><span class="p">)</span><span class="p">:</span> <span class="n">restore_transaction_methods</span><span class="p">(</span><span class="p">)</span> <span class="k">def</span> <span class="nf">test_data_attributes</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span><span class="p">:</span> <span class="c1"># ...</span> <span class="k">def</span> <span class="nf">test_class_properties</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span><span class="p">:</span> <span class="c1"># ...</span></code></pre></div>
May 2012
March 2012
-
Apologies
-
A Responsive Panacea
-
Introducing python-intercom
from intercom import User user = User.find(email='somebody@example.com')
December 2011
November 2011
-
Introducing python-docraptor
docraptor = DocRaptor() resp = docraptor.create({ 'document_content': '<p>python-docraptor Test</p>', 'test': True }) # PDF data is now available in resp.content
-
Codex Magazine #2
-
Continuous Learning
-
Baseliner
October 2011
September 2011
-
lesswatch
body { ... }
-
Automatically compile LESS files
-
8 Faces #3
-
Release: pathfinder 0.3.1
# only search top 2 levels of the directory tree paths = pathfinder.pathfind(".", depth=2)
-
Disclaimer: FUCK OFF
-
Using AFP to talk to ReadyNAS on OS X Lion
August 2011
-
Running and sharing your local web servers
Share this URL: https://xyz.showoff.io/
-
Orchestra + Engine Yard
July 2011
June 2011
-
Excel2CSV
A Python function to convert an.xls
file to.csv
. -
LetterMPress
-
Find a random unbound port
find_unbound_port
returns a (pseudo-)random unbound port on localhost. -
Extracting values from a Cherokee configuration file
Some Python functions to extract the maximumvserver
id and the maximumsource
id from a Cherokee configuration file. -
Per Instance Settings in gondor.io
-
gondor.io Initial Thoughts
May 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
-
The curse of ^[[A
-
Salon.com Scrolling
-
A Minute With Brendan
-
Python Ireland Unconference
-
Transmit’s Progress Bar
August 2010
July 2010
June 2010
-
Release: configpy 0.5
Release 0.5 includes support for compound keys, and better__getattr__
support.
May 2010
-
Releases: pathfinder & configpy
-
Release: configy 0.3
Release 0.3 adds support for multi-line and in-line comments.
April 2010
-
Shutdown and restart (automated dev env setup)
if [ $# -ne 1 ]; then PATHDIR=
</span><span class="nb">pwd</span><span class="sb">
else PATHDIR=$1 fi/usr/bin/osascript > /dev/null <<-EOF activate application "Terminal" tell application "System Events" keystroke "t" using {command down} end tell tell application "Terminal" repeat with win in windows try if get frontmost of win is true then do script "cd $PATHDIR; clear" in (selected tab of win) end if end try end repeat end tell EOF
# get the directory this script was launched from bindir=
</span>dirname <span class="nv">$0</span><span class="sb">
# open TextMate $bindir/termexec "cd $PATHDIR" $bindir/termexec "mate ."
$bindir/newtab $PATHDIR # for svn, git, etc.
# start Apache $bindir/newtab $PATHDIR $bindir/termexec "httpd -k restart -f $PATHDIR/dev_conf/localhost.conf"
# start PostgreSQL $bindir/newtab $PATHDIR # for postgres $bindir/termexec "$PATHDIR/bin/postgresql start"
# open Firefox open $FIREFOX –args $APP_URL
export FIREFOX APP_URL
bindir=
</span>dirname <span class="nv">$0</span><span class="sb">
$bindir/devapps "/Users/john/Workspace/demo/jobs"
-
Google Follow Finder
-
GitHub Gists
-
Football updates on the mobile web