keyes.ie
https://keyes.ie/
Recent content on keyes.ieHugo -- gohugo.ioen-us2023年11月03日 20:19:00 +0000Firebase in Node: functions is not a function
https://keyes.ie/firebase-functions-is-not-a-function/
2023年11月03日 20:19:00 +0000https://keyes.ie/firebase-functions-is-not-a-function/When initializing Firebase as follows:
const firebase = require("firebase/app"); require("firebase/functions"); // Initialize Firebase const firebaseApp = firebase.initializeApp(firebaseConfig); const firebaseFunctions = firebaseApp.functions(); and after upgrading from version 8.10.1 to 10.5.2 the following error was reported:
TypeError: firebaseApp.functions is not a function at Object.<anonymous> (/data/app.js:47:39) at Module._compile (node:internal/modules/cjs/loader:1205:14) at Module._extensions..js (node:internal/modules/cjs/loader:1259:10) at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29) at ModuleJob.run (node:internal/modules/esm/module_job:194:25) This is due a change in the Firebase SDK and a move from the namespaced style to the modular style as described in their Upgrade from the namespaced API to the modular API documentation.Wercker: You have reached your pull rate limit.
https://keyes.ie/wercker-docker-pull-rate-limit/
2020年11月20日 23:13:00 +0000https://keyes.ie/wercker-docker-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"
Why is this happening? On August 24th Docker announced new pull rate limits to Docker subscription plans:
Free plan – anonymous users: 100 pulls per 6 hours Free plan – authenticated users: 200 pulls per 6 hours Pro plan – unlimited Team plan – unlimited Okay, but I’m using Wercker not Docker Hub?Wi-Fi issues with macOS Catalina
https://keyes.ie/catalina-wifi/
2020年11月01日 13:47:00 +0000https://keyes.ie/catalina-wifi/I held off upgrading my OS from Mojve to Catalina, and then I simply forgot to. I did it recently, 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.
macReport’s article has a suggestion that worked. I followed the instructions in the step 4 “Create a new network location” section, and low and behold Wi-Fi connectivity was restored.Tailwind CSS + Hugo | Step 3 – Adding some basic content.
https://keyes.ie/tailwindcss-hugo-step-3/
2020年5月08日 23:45:00 +0000https://keyes.ie/tailwindcss-hugo-step-3/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.
Yes I could pre-plan this, and I’ve flip-flopped on writing up a design doc on this before doing any more work. However, what this would contain is beyond the horizon, and I fear I’d remain static.Tailwind CSS + Hugo | Step 2 – Create a Basic Layout
https://keyes.ie/tailwindcss-hugo-step-2/
2020年4月29日 22:45:00 +0000https://keyes.ie/tailwindcss-hugo-step-2/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
https://keyes.ie/pathfinder-0-6-2/
2020年4月28日 00:00:00 +0000https://keyes.ie/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.
0.6.2 @ PyPi Documentation @ Read the Docs Tailwind CSS + Hugo | Step 1 – Create the Theme
https://keyes.ie/tailwindcss-hugo-step-1/
2020年2月16日 19:26:00 +0000https://keyes.ie/tailwindcss-hugo-step-1/The first step in this process is to create a new Hugo theme.
hugo new theme tailwind-keyes This command creates a skeleton theme:
themes/tailwind-keyes ├── archetypes │ └── default.md ├── layouts │ ├── 404.html │ ├── _default │ │ ├── baseof.html │ │ ├── list.html │ │ └── single.html │ ├── index.html │ ├── partials │ │ ├── footer.html │ │ ├── header.html │ │ └── head.html ├── LICENSE ├── static │ ├── css │ └── js └── theme.Tailwind CSS + Hugo
https://keyes.ie/tailwindcss-hugo/
2020年2月14日 22:56:00 +0000https://keyes.ie/tailwindcss-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.
I’ve cloned this site to a new domain tailwind.keyes.ie and the new theme will be used for that site. This will be a bit by bit approach, and hopefully it’ll keep me interested enough to post updates here.Testing with pendulum
https://keyes.ie/testing-with-pendulum/
2020年1月29日 20:00:00 +0000https://keyes.ie/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")): Release: python-docraptor 1.2.3
https://keyes.ie/release-python-docraptor-1-2-3/
2019年1月09日 20:00:00 +0000https://keyes.ie/release-python-docraptor-1-2-3/python-docraptor has been updated:
Bugfix: explicity set .message on DocRaptorRequestException. Thanks to jarekwg for the Pull Request.
See PyPi for the 1.2.3 release.Python Package – begins
https://keyes.ie/python-package-begins/
2018年10月04日 11:33:00 +0000https://keyes.ie/python-package-begins/Need to convert a Python function into a command line tool? Take a look at begins:
Command line programs for lazy humans.
The following is an example from the documentation:
# holygrail_py3.py import begin @begin.start def run(name: 'What, is your name?', quest: 'What, is your quest?', colour: 'What, is your favourite colour?'): pass Decorating the run function as above automatically creates the following command:
usage: holygrail_py3.py [-h] -n NAME -q QUEST -c COLOUR optional arguments: -h, --help show this help message and exit -n NAME, --name NAME What, is your name?Docker Compose Default Environment Variables
https://keyes.ie/docker-compose-default-environment-variables/
2018年1月08日 09:50:00 +0000https://keyes.ie/docker-compose-default-environment-variables/Use the environment section to set an environment variable in a container via docker-compose:
environment: - DB_HOST=${DB_HOST} After docker-compose up the value of DB_HOST inside the container will be empty. To set the default value if the environment variable is empty or not set, use the following syntax:
environment: - DB_HOST=${DB_HOST:-localhost} To provide values for DB_HOST, either set it in the .env file or pass it on the command line:MongoDB fdatasync: Invalid argument
https://keyes.ie/mongodb-fdatasync/
2018年1月05日 17:48:00 +0000https://keyes.ie/mongodb-fdatasync/I tried to start up mongod in a VirutalBox Ubuntu VM and got the following error:
mongod --dbpath data ... WiredTiger error (22) [1515174663:595770][5709:0x7ff778b159c0], \ connection: data/: directory-sync: fdatasync: Invalid argument This happened because I was trying to store the data directory in a shared folder which is not supported as MongoDB requires a filesystem that supports fsync on directories.
To fix this simply use a non-shared folder in the VM:python-intercom is moving out
https://keyes.ie/python-intercom-moving-out/
2017年12月20日 00:51:00 +0000https://keyes.ie/python-intercom-moving-out/I’m delighted to announce that Intercom have taken ownership of python-intercom and I’m sure they’ll give it the attention it deserves.
I had fun writing it, but I wasn’t putting enough effort into maintaining it, and keeping it in sync with changes to the API itself. I’ll keep an eye on how things are developing, but from here out I’m just another watcher.
Thankfully GitHub is awesome enough to forward you to the correct repo now even if you use the old links.python-intercom 3.0
https://keyes.ie/python-intercom-3.0/
2017年2月04日 21:02:00 +0000https://keyes.ie/python-intercom-3.0/Version 3 is not backward compatible with version 2.
The following are the full list of changes in version 3:
3.0b4 Added conversation.mark_read method. #136 3.0b3 Added TokenUnauthorizedError. #134 Added UTC datetime everywhere. #130 Fixed connection error when paginating. #125 Added Personal Access Token support. #123 Fixed links to Intercom API documentation. #115 3.0b2 Added support for Leads. #113 Added support for Bulk API.python-intercom 3.0b3
https://keyes.ie/python-intercom-3.0b3/
2016年11月17日 12:48:00 +0000https://keyes.ie/python-intercom-3.0b3/Version 3 is not backward compatible with version 2.
The main changes are that it now supports multiple clients within the same process, direct support for Personal Access Tokens, and support for the Bulk API.
Multiple client support makes its possible to work with more than one Intercom App:
from intercom.client import Client intercom_app_1 = Client("PAT_1") intercom_app_2 = Client("PAT_2") app_1_users = intercom_app_1.users.find() app_2_users = intercom_app_2.users.find() As can be seen in that code snippet, to create the client you use a PAT (Personal Access Token) which you can create via the App Settings in Intercom.Password Reset on freenode
https://keyes.ie/freenode-password-reset/
2016年9月19日 16:21:00 +0000https://keyes.ie/freenode-password-reset/It took me a while to figure out how to get a password reset email from freenode, so here’s how:
/msg NickServ SENDPASS <account> Heroku run Exit Codes
https://keyes.ie/heroku-run-exit-code/
2016年9月06日 22:53:00 +0000https://keyes.ie/heroku-run-exit-code/For the past few years I’ve come to rely on Glenn Gillen’s plugin to get the exit code from processes executed by heroku run. Well colour me behine the times, but Heroku resolved this issue in May 2015.
The Heroku run command:
$ heroku run echo "Hello Foo!" Running echo "Hello Foo!" on ⬢ my-app... up, run.1847 Hello Foo! $ echo $? 0 All good, everything ran as expected. Now let’s try to run an unknown command:How to specify where to store Let's Encrypt certificates
https://keyes.ie/lets-encrypt-renewal/
2016年1月11日 23:31:00 +0000https://keyes.ie/lets-encrypt-renewal/I ran into a problem with cert renewal (when I was testing my automatic CloudFrontThing), I wasn’t able to determine where the certificates generated by the Let’s Encrypt client were going to be stored when getting a certificate for multiple domains. s I examinated the source code and discovered there are some arguments I can pass to specify exactly where the files should go:
--cert-path=.../cert.pem --chain-path=.../chain.pem --fullchain-path=.../fullchain.pem --key-path=.../privkey.pem Release: python-docraptor 1.2.2
https://keyes.ie/release-python-docraptor-1-2-2/
2016年1月11日 12:10:00 +0000https://keyes.ie/release-python-docraptor-1-2-2/python-docraptor has been updated:
Default timeout now set to 90 seconds. See PyPi for the 1.2.2 release.Renewing Let's Encrypt Certificates
https://keyes.ie/lets-encrypt-renewal/
2016年1月05日 13:31:00 +0000https://keyes.ie/lets-encrypt-renewal/Next step on my Let’s Encrypt travels are to set up automatic renewal of the certificates, because each certificate is only valid for 90 days.
The following is the config file I use:
# webroot.ini # the key size rsa-key-size = 4096 # automatically agree to the terms of service agree-tos = True # renew certs by default renew-by-default = True # use webroot authenticator authenticator = webroot and this is the command I run to renew the certificate:No post content in Jekyll index pages
https://keyes.ie/jekyll-paginate-no-index/
2016年1月03日 13:31:00 +0000https://keyes.ie/jekyll-paginate-no-index/When I upgraded Jekyll from 2.5 to 3, the pages that iterate over site.posts had no content in them. A deprecation warning points the way towards the fix.
$ bundle exec jekyll build Configuration file: /pipeline/source/_config.yml Deprecation: You appear to have pagination turned on, but you haven't included the `jekyll-paginate` gem. Ensure you have `gems: [jekyll-paginate]` in your configuration file. Source: /pipeline/source I added gems: [jekyll-paginate] to my config file but when I tried to build another error surfaced:Jekyll Responsive Embed Update
https://keyes.ie/jekyll-responsive-embed-update-1/
2015年12月30日 16:49:00 +0000https://keyes.ie/jekyll-responsive-embed-update-1/I’ve updated the Responsive Embed convertor so the markup templates are part of the plugin module, and not separate HTML files.
This makes it much easier to install the plugin. Simply copy responsive_embed.rb from the repository and place it in the _plugins directory of your Jekyll site.
I’ve also created a repository for the project on GitHub, as I’ve now promoted this to being a Thing.Uploading a Let's Encrypt Certificate to AWS
https://keyes.ie/aws-upload-letsencrypt-certificate/
2015年12月29日 14:09:00 +0000https://keyes.ie/aws-upload-letsencrypt-certificate/Following on from my earlier post I’ve improved two of the steps that I trampled over yesterday.
Install User Policy I created an IAM user just to upload server certificates to AWS, and added the following Inline Policy to that user’s permissions:
{ "Version": "2012年10月17日", "Statement": [ { "Effect": "Allow", "Action": "iam:UploadServerCertificate", "Resource": "*" } ] } Upload Server Certificate Using the AWS CLI I uploaded the certificate with the following command:Let's Encrypt CloudFront
https://keyes.ie/letsencrypt-cloudfront/
2015年12月29日 00:26:00 +0000https://keyes.ie/letsencrypt-cloudfront/Create the Certificate Rather than having to stop the webserver I create the certificate manually:
./letsencrypt-auto certonly -a manual --rsa-key-size 2048 \ -d files.keyes.ie -d s.files.keyes.ie I read somewhere that keys greater than 2048 were not supported on CloudFront. I’ll investigate this when renewal is required.
During this process you will be asked to pass a challenge by creating a well known URL and returning some well known content.baseliner 1.0
https://keyes.ie/release-baseliner-1-0/
2015年12月28日 01:59:00 +0000https://keyes.ie/release-baseliner-1-0/The overlay in Baseliner 1.0 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.
The bookmarklet has been updated to use 1.0. This version has been tested in the latest Safari, Firefox, and Chrome on OS X 10.10. Baseliner 1.0 is enabled on this page, so you can test whether it works in your browser of choice.baseliner 1.0.beta
https://keyes.ie/release-baseliner-1-0-beta/
2015年8月26日 09:00:00 +0000https://keyes.ie/release-baseliner-1-0-beta/Baseliner 1.0.beta(minified) 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.
The bookmarklet is still using version 0.9.11, I’ll update that when I’m happy enough with how this version is working.
The overlay is now generated as SVG and then set as a background image using a Data URL.python-intercom 2.1.1
https://keyes.ie/python-intercom-2-1-1/
2015年8月12日 12:03:00 +0000https://keyes.ie/python-intercom-2-1-1/python-intercom 2.1.1 has been released.
The following are the major issues resolved in this release:
Adding interface support for opens, closes, and assignments of conversations. #101 Ensuring identity_hash only contains variables with valid values. #100 Adding support for unique_user_constraint and parameter_not_found errors. #97 See PyPi for the 2.1.1 release and Read the Docs for the latest documentation.Keybase Web Identity Alert
https://keyes.ie/keybase/web-identity-alert/
2015年8月01日 23:00:00 +0000https://keyes.ie/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.
Uh-oh, jkeyes, your previously-proven web identity http://keyes.ie just broke. We’ve been checking it repeatedly, and it’s not working from our perspective.
Dropbox Deletion Warning
https://keyes.ie/dropbox/dropbox-delete-warning/
2015年7月30日 13:15:00 +0000https://keyes.ie/dropbox/dropbox-delete-warning/I deleted thousands of files from Dropbox recently, and the following morning I received this excellent email from Dropbox.
{% figure_img 0 %}
Hi John,
We noticed that you recently deleted a large number of files from your Dropbox. Deleted files are saved for 30 days, and can be restored anytime during that 30-day window.
Dropbox will save deleted files longer than 30 days if you’ve purchased Extended Version History, or if you have a Dropbox for Business account.python-intercom 2.0.0
https://keyes.ie/python-intercom-2-0-0/
2015年5月11日 00:00:00 +0000https://keyes.ie/python-intercom-2-0-0/python-intercom 2.0.0 has been released.
The following are the major issues resolved in this release:
Added support for non-ASCII character sets. #86 Fixed response handling where no encoding is specified. #81 Added support for None values in FlatStore. #88 See PyPi for the 2.0.0 release and Read the Docs for the latest documentation.python-intercom 2.0.beta
https://keyes.ie/python-intercom-2-0-beta/
2015年4月03日 00:00:00 +0000https://keyes.ie/python-intercom-2-0-beta/python-intercom 2.0.beta has been released.
The following are the major issues resolved in this release:
Fixed UnboundLocalError in Request.parse_body. #72 Added support for replies with an empty body. #72 Fixed a bug in identifying changed attributes when creating new resources. #77 I’ve added an FAQ to the documentation to supplement the standard docs.
See PyPi for the 2.0.beta release and Read the Docs for the latest documentation.python-intercom 2.0.alpha
https://keyes.ie/python-intercom-2-0-alpha/
2015年3月29日 00:00:00 +0000https://keyes.ie/python-intercom-2-0-alpha/python-intercom now supports the Intercom API v2. This release is not backwards compatiable with 0.2.13 (v1 of the API) due to changes in the API.
The entire codebase has been rewritten since 0.2.13. The layout of the code reflects intercom-ruby, and the layout of the documentation is similar to the official API docs.
The reason for this mimicy is to make it easier to support future changes, and to reduce friction for Intercom if they wish to take ownership of the project.HTTPretty test hanging on Travis
https://keyes.ie/travis-nose-httpretty/
2015年3月27日 00:00:00 +0000https://keyes.ie/travis-nose-httpretty/While making python-intercom Python 3 compatible, I ran into an issue on Travis.
The nosetests command doesn’t appear to exit when run on Python 3.4 (it behaves as expected on Python 2.7). I narrowed it down to tests that use HTTPretty and created a small project to highlight the issue, and to publish the results of a failed build:
$ nosetests .. ---------------------------------------------------------------------- Ran 2 tests in 0.061s OK No output has been received in the last 10 minutes, this potentially indicates a stalled build or something wrong with the build itself.New Work Junction
https://keyes.ie/new-work-junction/
2015年3月02日 00:00:00 +0000https://keyes.ie/new-work-junction/New Work Junction is a new coworking space that has recently opened in Kilkenny. There are many benefits to coworking, and it’s great to finally have such a space locally.
The monthly membership options range from dedicated office space (Premium – 490ドル), to use of the common areas (Social – 40ドル).
Want to know more? Call in and have a chat with Tom. The building is located beside the train station in what was the AIB branch.GitHub Extra Border
https://keyes.ie/github-extra-border/
2014年9月24日 00:00:00 +0000https://keyes.ie/github-extra-border/I noticed an extra border peeking back at me today on the GitHub contributions group:
It can be fixed by the following CSS:
.contrib-column:nth-child(3) { border-left: none; } python-intercom and self fields
https://keyes.ie/python-intercom-self/
2014年9月15日 00:00:00 +0000https://keyes.ie/python-intercom-self/Intercom’s docs state the following:
All objects in the API have an id field indicating their logical identifier. Some objects may optionally also have a self field that indicates a URL or canonical address for the object.
self A URL that addresses the object within the API. The self field will not be larger than 255 characters (in SQL it corresponds to a varchar(255)).
Both fields id and self hold special significance in Python.python-intercom 0.2.13
https://keyes.ie/python-intercom-0-2-13/
2014年9月09日 00:00:00 +0000https://keyes.ie/python-intercom-0-2-13/This release allows wildcard importing from the intercom module, i.e. import * from intercom. Thanks Marcel.
See PyPi for the 0.2.13 release and Read the Docs for the latest documentation.Jekyll Responsive Embed Converter
https://keyes.ie/jekyll-responsive-embed/
2014年9月07日 00:00:00 +0000https://keyes.ie/jekyll-responsive-embed/Embed Responsively is a handy tool for converting media URLs into responsive markup. It ensures the YouTube video you embed in your post will fit the width of it’s container, rather than having it’s dimensions constrained by height and width attributes.
I rarely write any Ruby, and my recent foray into Jekyll gave me a good reason to go write something. Rather than visiting Embed Responsively every time I wanted to include a video in a post, I wanted Jekyll to generate the embed markup when the site is being built.Calculate Age with Python
https://keyes.ie/calculate-age-with-python/
2014年9月04日 00:00:00 +0000https://keyes.ie/calculate-age-with-python/I was working on a problem the other day that required me to calculate the age of a person in years. Rather than visiting Stack Overflow and grabbing a ready made solution I put together the following function:
def age(when, on=None): if on is None: on = datetime.date.today() on_unix = time.mktime(on.timetuple()) when_unix = time.mktime(when.timetuple()) return int((on_unix - when_unix) / 3.15569e7) # age of someone from today (2014年09月04日) age(date(2000, 1, 1)) # 14 age(date(1997, 9, 4)) # 17 age(date(1997, 9, 5)) # 16 # age of someone from 2014年01月01日 age(date(2000, 1, 1), date(2014, 1, 1)) # 14 age(date(1997, 9, 4), date(2014, 1, 1)) # 16 age(date(1997, 9, 5), date(2014, 1, 1)) # 16 While this approach was working as expected, it was very slow, and I suspected it was the time.Argument Parsing for Humans
https://keyes.ie/argument-parsing-for-humans/
2014年9月02日 00:00:00 +0000https://keyes.ie/argument-parsing-for-humans/Processing command line arguments might seem like a very simple task (and relative to big problems it is), but there is still a considerable amount of edge cases to cater for. Trust me, I was one of the developers of the Commons CLI library and there was way more work in that than I imagined.
However, more often than not, the command line programs I write, have a very basic argument structure.NameError: global name 'basestring' is not defined
https://keyes.ie/basestring-is-not-defined/
2014年9月01日 00:00:00 +0000https://keyes.ie/basestring-is-not-defined/The following is common enough to be used as an early warning system for code that is not Python 3 compatible.
NameError: global name 'basestring' is not defined This can be read as "a Python 3 interpreter is attempting to run code that is not Python 3 compatible".The Magic is in The Process
https://keyes.ie/the-magic-is-in-the-process/
2014年9月01日 00:00:00 +0000https://keyes.ie/the-magic-is-in-the-process/A wonderful story of perseverence and learning by Jane Ní Dhulchaointigh. The evident emotion when speaking about some of the real-world successes of Sugru is magic.
The Magic Is in The ProcessLogging Session and Environment with airbrake-python
https://keyes.ie/logging-with-airbrake-python/
2014年8月26日 00:00:00 +0000https://keyes.ie/logging-with-airbrake-python/My Pull Request for airbrake-python to support logging session and environment details in Airbrake was merged recently. This has made it possible to easily log session and environment details using Python’s logging facility.
Installation Let’s use pip to install the latest version of airbrake-python:
pip install -e git+git@github.com:airbrake/airbrake-python.git#egg=airbrake-python Configuration Next we set some environment variables:
AIRBRAKE_API_KEY the project API key located in the project settings AIRBRAKE_PROJECT_ID the project ID located in the URL project_id parameter Simple Logging It’s very easy to up and running with airbrake-python.Release: python-intercom 0.2.12
https://keyes.ie/release-python-intercom-0-2-12/
2014年8月23日 00:00:00 +0000https://keyes.ie/release-python-intercom-0-2-12/This is the final planned release of python-intercom that will support the v1 API.
It contains the following changes:
support for events updated links to Intercom API docs. new RTD sphinx theme for documentation See PyPi for the 0.2.12 release and Read the Docs for the latest documentation.Release: baseliner 0.9.11
https://keyes.ie/release-baseliner-0-9-11/
2014年8月03日 00:00:00 +0000https://keyes.ie/release-baseliner-0-9-11/In Baseliner 0.9.11 the grid size and grid offset types are now set to number. Thanks to Angry Dan for the suggestion.Release: pathfinder 0.5.3
https://keyes.ie/pathfinder-0-5-3/
2013年11月19日 00:00:00 +0000https://keyes.ie/pathfinder-0-5-3/Pathfinder 0.5.3 is a minor release, with a fix that eliminates the use of chdir in the generator (thanks rubik).
PyPi 0.5.3 Read the Docs Documentation Release: python-intercom 0.2.10
https://keyes.ie/release-python-intercom-0-2-10/
2013年11月19日 00:00:00 +0000https://keyes.ie/release-python-intercom-0-2-10/You wait for a bus and then two come along!
Hot on the heels of 0.2.9 I’m releasing python 0.2.10 with the following changes:
basic support for companies. fixed User.delete. updated links to Intercom API docs. Doctest fixes. See PyPi for the 0.2.10 release and Read the Docs for the latest documentation.Release: baseliner 0.9.9
https://keyes.ie/baseliner-0-9-9/
2013年11月17日 00:00:00 +0000https://keyes.ie/baseliner-0-9-9/Baseliner 0.9.9 has added support for the grid to be offset vertically in the viewport. This can be configured using the gridOffset configuration variable, or via the UI. Thanks to Michael Herold for adding this feature.
Please see the project page or GitHub for more details.Release: python-intercom 0.2.9
https://keyes.ie/python-intercom-0-2-9/
2013年11月17日 00:00:00 +0000https://keyes.ie/python-intercom-0-2-9/I’m pleased to announce the latest release of python-intercom with:
unsubscribed_from_emails attribute added to User object. last_request_at parameter supported in Intercom.create_user. page, per_page, tag_id, and tag_name parameters support in Intercom.get_users. See PyPi for the 0.2.9 release and Read the Docs for the latest documentation.Heroku run command exit status on Wercker
https://keyes.ie/heroku-run-command-exit-status-on-wercker/
2013年9月02日 00:00:00 +0000https://keyes.ie/heroku-run-command-exit-status-on-wercker/One of my deploy steps on Wercker is to run South migrations:
- script:name:migratewithsouthcode:herokurun"python manage.py migrate"-a$HEROKU_APP_NAME There is a known issue with the Heroku client that the true exit status of the command is not returned by the client. To workaround this problem you can install the heroku-exit-status plugin:
- script:name:installheroku-exit-statusplugincode:herokuplugins:installhttps://github.com/glenngillen/heroku-exit-status.git Now if the migrate fails, the Wercker deployment also fails.
I’ve made the full deploy steps available in a Gist.Release: pathfinder 0.5.2
https://keyes.ie/release-pathfinder-0-5-2/
2013年9月02日 00:00:00 +0000https://keyes.ie/release-pathfinder-0-5-2/Due to a couple of silly oversights by me it wasn’t possible to install pathfinder from PyPi. That’s been resolved in the new 0.5.2 release.
See PyPi for the 0.5.2 release.Release: pathfinder 0.5
https://keyes.ie/release-pathfinder-0-5/
2013年8月13日 00:00:00 +0000https://keyes.ie/release-pathfinder-0-5/pathfinder has been updated:
the new find_paths function returns a generator using any and all in OrFiter and AndFilter See PyPi for the 0.5 release.Release: python-docraptor 1.2.1
https://keyes.ie/release-python-docraptor-1-2-1/
2013年8月12日 00:00:00 +0000https://keyes.ie/release-python-docraptor-1-2-1/python-docraptor has been updated:
Python 3 compatibility Updated documentation See PyPi for the 1.2.1 release.pushState and replaceState bug in Chrome
https://keyes.ie/pushstate-and-replacestate-bug-in-chrome/
2013年6月19日 00:00:00 +0000https://keyes.ie/pushstate-and-replacestate-bug-in-chrome/Today I noticed that pushState and replaceState cause the reload button and favicon to flicker although no page load (or reload) has occurred.
This bug in Chrome was first reported in July 2010 but still exists in the latest version for OS X. The reload button/throbber doesn’t flicker in Chrome for iOS but the favicon changes to the default (greyscale globe).
I’ve created a demo on JS Bin that reproduces the conditions to observe this behaviour, and a brief (silent) screencast that displays the behaviour.Ignore files when deploying from wercker
https://keyes.ie/ignore-files-when-deploying-from-wercker/
2013年6月16日 00:00:00 +0000https://keyes.ie/ignore-files-when-deploying-from-wercker/wercker doesn’t currently have provide a feature to ignore files when deploying.
As I deploy to Heroku using a git push I can use a .gitignore file to ignore files when deploying from wercker.
I have two ignore files, .gitignore is for my app repository, and .deploy.gitignore is for ignoring files during the deploy stage.
As part of my build I overwrite .gitignore with .deploy.gitignore. When wercker creates the deploy repository it ignores any files that match the rules in the ignore file.How to install lessc on wercker
https://keyes.ie/how-to-install-lessc-on-wercker/
2013年6月15日 00:00:00 +0000https://keyes.ie/how-to-install-lessc-on-wercker/Want to compile your LESS assets on werker?
The wercker/python box does not have a LESS compiler available. To install lessc you must first install npm but when I tried to execute curl http://npmjs.org/install.sh | sh on wercker the script reported some errors (which I didn’t record and now can’t reproduce).
Use the following script to install lessc on wercker:
box:wercker/pythonbuild:steps:- script:name:"install lessc"code:|- curl https://npmjs.org/install.sh | sudo bashsudonpminstallless-g lessc can also be installed locally (not using sudo) if you prefer.Release: python-intercom 0.2.8
https://keyes.ie/release-python-intercom-0-2-8/
2013年5月08日 00:00:00 +0000https://keyes.ie/release-python-intercom-0-2-8/I’ve updated python-intercom recently with the following:
added support for tagging fix bug that prevented installing into a clean environment – thanks vrachil PEP8 formatting fix to a doctest to pass with current Intercom dummy API. See PyPi for the 0.2.8 release and Read the Docs for the latest documentation.HTTP 400 errors when using run_every in IronWorker Python
https://keyes.ie/http-400-errors-when-using-ironworker/
2013年4月16日 00:00:00 +0000https://keyes.ie/http-400-errors-when-using-ironworker/Say you have a small script like the following:
import sys from iron_worker import IronWorker from iron_worker import Task worker = IronWorker() task = Task( code_name="HelloWorld", scheduled=True, run_every=sys.argv[1]) response = worker.queue(task) print response If you want to schedule the job to run every minute you could call python schedule.py 60. This will unfortunately return an HTTP 400 response.
The reason is that the run_every parameter is being passed as a string.Release: django-methodview 0.1.2
https://keyes.ie/release-django-methodview-0-1-2/
2013年4月15日 00:00:00 +0000https://keyes.ie/release-django-methodview-0-1-2/django-methodview has been updated with support for (what I consider to be) invalid media-ranges (e.g. just *).
Yes the documentation is *cough* lacking, and I will remedy that in the near future.
See PyPi for the 0.1.2 release.Django Code of Conduct
https://keyes.ie/django-code-of-conduct/
2013年4月02日 00:00:00 +0000https://keyes.ie/django-code-of-conduct/In light of recent events at PyCon, there has been plenty of discussion about inappropriate conduct. Due to the numerous tangents this discussion has taken, I think it’s important to contemplate why PyCon has a code of conduct.
The first draft of Django’s Code of Conduct hits the nail on the head for me:
Maintaining a code of conduct forces us to consider and articulate what kind of community we want to be, and serves as a constant reminder to put our best foot forward.Freemium Cheating
https://keyes.ie/freemium-cheating/
2013年4月02日 00:00:00 +0000https://keyes.ie/freemium-cheating/Cheating is only a problem if your product or service is expensive to deliver; after all, cheaters may be evangelists and future customers.
Steven Dupree on flavors of freemium.
Wise words, as often the guards put in place to prevent cheating are more expensive than the cheating itself.Release: python-intercom 0.2.7
https://keyes.ie/release-python-intercom-0-2-7/
2013年3月11日 00:00:00 +0000https://keyes.ie/release-python-intercom-0-2-7/I’ve updated python-intercom recently with the following:
support for delete user – thanks payala. support for creating user notes. handles invalid JSON responses – thanks marselester. fix to doctests to pass with current Intercom dummy API. See PyPi for the 0.2.7 release and Read the Docs for the latest documentation.
And in almost-but-not-quite-exciting-news, python-intercom is nearly one year old, the first commit to the repository was on 17th March 2012.WIP: Python Markdown prettypre extension
https://keyes.ie/wip-python-markdown-prettypre-extension/
2013年3月09日 00:00:00 +0000https://keyes.ie/wip-python-markdown-prettypre-extension/Update 03/09 16:23: *I just discovered CodeHilite which uses Pygments to markup the code for highlighting. Removing my solution’s JavaScript dependency is a nice win. *
I’ve been working on a documentation tool as a side-project and one of the aims is to use Markdown as the source format. It’s nice when code snippets are syntax highlighted in documentation so I am working on a Python Markdown extension to enable that, without introducing too much of a burden on the document author.Typeform
https://keyes.ie/typeform/
2013年3月08日 00:00:00 +0000https://keyes.ie/typeform/I received my beta invite to Typeform a couple of days ago, and today I had a need to gather some data around the area of online service sign-ups at trade fair booths. This was an ideal time to test it out.
What is Typeform? Typeform want us to "Say goodbye to boring forms & surveys". At first glance that may read as a frivolous statement, but forms are the gateway and the wall between human and service.Hyperlink Protection Racket
https://keyes.ie/nni-hyperlink-protection-racket/
2012年12月30日 00:00:00 +0000https://keyes.ie/nni-hyperlink-protection-racket/Another day, another crazy idea of how to make money on the internet. There’s a unique twist to this one though, it’s a charge for the fundamental building block of the web – hyperlinks.
I’ve just read McGarr Solicitors post which describes how the National Newspapers of Ireland (NNI) are trying to collect money from any website that link directly to an online article of any of their member’s papers.Hyperlinks with Unicode in ReST
https://keyes.ie/hyperlinks-with-unicode-in-rest/
2012年11月28日 00:00:00 +0000https://keyes.ie/hyperlinks-with-unicode-in-rest/I noticed the following "challenge" on Twitter last night:
Challenge: Figure out how to create a hyperlink for the text "AcmeTM" without using the literal character "TM" in ReST. Prize for the winner.
In the oft-repeated words of Barney Stinson, challenge accepted:
|Acme(TM)|_.. |Acme(TM)| unicode:: Acme U+2122.. _Acme(TM): http://example.com Visit the Gist to see the rendered output.Three Laws of Data Protection
https://keyes.ie/three-laws-of-data-protection/
2012年11月19日 00:00:00 +0000https://keyes.ie/three-laws-of-data-protection/Your data is Yours Your data is Protected Your data is Portable If you are taking an ethical approach to developing your application, you should obey Evernote’s Three Laws of Data Protection.codepad.org
https://keyes.ie/codepad-org/
2012年10月06日 00:00:00 +0000https://keyes.ie/codepad-org/codepad.org is an online compiler/interpreter, and a simple collaboration tool. It’s a pastebin that executes code for you. You paste your code, and codepad runs it and gives you a short URL you can use to share it.
I discovered codepad.org today while reading an answer on stackoverflow.
What I like most, is how simple it is to use. Check out the Python example I created. Don’t worry if Python isn’t you bag, it also supports Ruby, Perl, Haskell, PHP, C and more.Django TestCase Transaction Wrapping
https://keyes.ie/django-testcase-transaction-wrapping/
2012年10月04日 00:00:00 +0000https://keyes.ie/django-testcase-transaction-wrapping/Django supplies it’s own TestCase class which wraps each test in a transaction. This means any changes a test makes to the test database(s) are rolled back when the test has finished. It also means that test fixtures are reloaded for each test.
I wanted to test a substantial data set, and still have succinct tests. Using the Django TestCase was proving too slow, so I repurposed some of the code from TestCase into two functions:Play to Learn — VIM Adventures
https://keyes.ie/play-to-learn-vim-adventures/
2012年5月28日 00:00:00 +0000https://keyes.ie/play-to-learn-vim-adventures/Vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor distributed with most UNIX systems.
Now you can learn how to use VIM by playing a game; VIM Adventures. This is well worth a peek if you are looking for a gentle introduction to VIM, as it replaces some of the fear with cute graphics and simple gameplay.Rams – Design by Vitsœ
https://keyes.ie/rams-design-by-vits/
2012年5月15日 00:00:00 +0000https://keyes.ie/rams-design-by-vits/Design is not dress-up:
A designer who wants to achieve good design must not regard himself as an artist who, according to taste and aesthetics, is merely dressing-up products with a lastminute garment.
and don’t mistake gloss for design:
To use design to impress, to polish things up, to make them chic, is no design at all. This is packaging.
Technical specifications in isolation are not good design:Apologies
https://keyes.ie/apologies/
2012年3月29日 00:00:00 +0000https://keyes.ie/apologies/In a world of terrible apologies, I like the honesty of SmugMug’s to Valerie Schooling:
Sometimes you see the dumb things companies say and you wonder, "What were they thinking?" I never imagined that happening to us, but we did something so dumb in a blog post, we’re now looking at each other blankly and asking, what were we thinking?
A Responsive Panacea
https://keyes.ie/a-responsive-panacea/
2012年3月25日 00:00:00 +0000https://keyes.ie/a-responsive-panacea/Worst of all, beyond any complaints you may have about alternate versions of sites – with responsive its’s a one way street. You can’t opt out of the media query that’s driving this thing. And that really sucks, so you better be pretty sure you can pull this thing off sonny Jim.
A Responsive Panacea – Alex MorrisIntroducing python-intercom
https://keyes.ie/introducing-python-intercom/
2012年3月22日 00:00:00 +0000https://keyes.ie/introducing-python-intercom/python-intercom is a python interface to Intercom’s API. It is designed to (almost) mirror the behaviour of python-ruby. Here is an example of it in action:
from intercom import Impression impression = Impression.create(email='somebody@example.com') from intercom import User user = User.find(email='somebody@example.com') For more details you can check out the project repository, and the pypi page.Idea Magazine
https://keyes.ie/idea-magazine/
2011年12月02日 00:00:00 +0000https://keyes.ie/idea-magazine/Idea Magazine, a journal of ideas & technology in Ireland, is launching on Thursday, December 8th. Best of luck to Martha and Stu.Introducing python-docraptor
https://keyes.ie/introducing-python-docraptor/
2011年11月29日 00:00:00 +0000https://keyes.ie/introducing-python-docraptor/python-docraptor is a python interface to the Doc Raptor document generation API. It is designed to mirror (well almost) the behaviour of the doc-raptor-gem, including asynchronous support. Here’s an example of it in action:
from docraptor import DocRaptor docraptor = DocRaptor() resp = docraptor.create({ 'document_content': '&lt;p>python-docraptor Test&lt;/p>', 'test': True }) # PDF data is now available in resp.content Visit the repository for more examples.Codex Magazine #2
https://keyes.ie/codex-magazine-2/
2011年11月20日 00:00:00 +0000https://keyes.ie/codex-magazine-2/I was delighted with the announcement today that Codex, a wonderful typography magazine, will publish issue #2 in Spring 2012. If you like type, there are still a few copies of issue #1 available. Do yourself a favour, and grab a copy.Continuous Learning
https://keyes.ie/continuous-learning/
2011年11月10日 00:00:00 +0000https://keyes.ie/continuous-learning/As you may be aware, I’ve been doing a fair bit of work with baseline grids this past couple of weeks. As part of that work, I’ve created two tools to help with displaying the grid.
One, Baseliner is a JavaScript tool, that creates a baseline grid overlay. There is an accompanying bookmarklet, which means it’s easy to drop a grid over any page. The other, Baseline Background, is a web app that generates PNGs that can be used to create your baseline grid (Baseliner uses this).Baseliner
https://keyes.ie/baseliner/
2011年11月04日 00:00:00 +0000https://keyes.ie/baseliner/I’ve been experimenting with baseline grids and after created three tiling background images for various grid sizes I set about writing a tool to relieve me of this burden.
A couple of hours later and I have an initial version of Baseliner ready to roll. It is currently based on jQuery (for personal efficiency, but there is no reason why it can’t be rewritten in unadorned JavaScript) and PNGlib to dynamically create the background images.Hacker News Traffic
https://keyes.ie/hacker-news-traffic/
2011年10月14日 00:00:00 +0000https://keyes.ie/hacker-news-traffic/I’ve recently started using Gaug.es web analytics service, and love how hypnotic their live traffic map is. Science Code Manifesto made it onto the front page of Hacker News today, so I spent some time looking at the hits coming through.
Gauges traffic from Hacker NewsLaunch: Science Code Manifesto
https://keyes.ie/launch-science-code-manifesto/
2011年10月14日 00:00:00 +0000https://keyes.ie/launch-science-code-manifesto/The Climate Code Foundation has just launched a Science Code Manifesto which lays out principles for the publication of science software.
Here’s a badge which you can stick on your site to publicise your endorsement of the manifesto:lesswatch
https://keyes.ie/lesswatch/
2011年9月29日 00:00:00 +0000https://keyes.ie/lesswatch/Following on from my previous itch-scratching, I’ve improved lesswatch. The new version includes support for dependency checking. For example, say we have header.less and style.less imports it:
/* styles.less */ @import "header"; body { ... } When header.less is changed, lesswatch compiles both header.less and styles.less.Automatically compile LESS files
https://keyes.ie/automatically-compile-less-files/
2011年9月26日 00:00:00 +0000https://keyes.ie/automatically-compile-less-files/A nice feature of Compass is that it provides a watch command line option. When you pass this option, compass automatically compiles SASS files when they are saved.
LESS doesn’t provide a similar option, so I created lesswatch.
It uses watchdog’s watchmedo script, which can run a command when a file change is detected. watchdog is implemented in Python and can be installed from PyPi. Compilation from LESS to CSS is performed by lessc.8 Faces #3
https://keyes.ie/8-faces-3/
2011年9月19日 00:00:00 +0000https://keyes.ie/8-faces-3/Another beautiful copy of 8 Faces arrived today, along with a fantastic type catalogue for Photo-Lettering. I didn’t win the underware champagne.
More photos.Release: pathfinder 0.3.1
https://keyes.ie/release-pathfinder-0-3-1/
2011年9月13日 00:00:00 +0000https://keyes.ie/release-pathfinder-0-3-1/New version of pathfinder released with support for limiting the depth of a search, and sequence Filters now inherit from list.
import pathfinder # only search top 2 levels of the directory tree paths = pathfinder.pathfind(".", depth=2) Disclaimer: FUCK OFF
https://keyes.ie/disclaimer-fuck-off/
2011年9月08日 00:00:00 +0000https://keyes.ie/disclaimer-fuck-off/I noticed this text at the bottom of a bulk mail I received from Ashish:
Disclaimer – If you want to be removed from the mailing list reply with "unsubscribe" in the subject line and specify your e-mail address as mentioned in the circular for faster response to unsubscribe. Since India has no anti spamming law, we follow the US Unsolicited Electronic Mail Act of 2000, which states that mail cannot be considered spam if if contains contact/removal information, which this mail does.Using AFP to talk to ReadyNAS on OS X Lion
https://keyes.ie/using-afp-to-talk-to-readynas-on-os-x-lion/
2011年9月04日 00:00:00 +0000https://keyes.ie/using-afp-to-talk-to-readynas-on-os-x-lion/A couple of days ago I tweeted about the first issue I had discovered since installing OS X Lion:
There was a problem connecting to Twitter. The following day the I received the following reply:
There was a problem connecting to Twitter. Bingo! I installed the beta firmware today and now have AFP access to my ReadyNAS from Lion and Snow Leopard.Running and sharing your local web servers
https://keyes.ie/running-and-sharing-your-local-web-servers/
2011年8月25日 00:00:00 +0000https://keyes.ie/running-and-sharing-your-local-web-servers/If you are a web developer or a web designer, you will have run a local web server as part of your design or development process. Two of the most common ways to do this on OS X are with MAMP or the bundled Apache installation. One of the problems with this approach is that you are restricted to where your work files are located (or else you have to start editing configuration files).Orchestra + Engine Yard
https://keyes.ie/orchestra-engine-yard/
2011年8月24日 00:00:00 +0000https://keyes.ie/orchestra-engine-yard/I’m saddened to hear that Echolibre are winding down their consultancy business. I’m delighted to hear that it’s because their Orchestra product is gathering momentum, and they are joining forces with Engine Yard to further develop it.
From the Orchestra blog:
We are delighted to announce that Orchestra has joined forces with Engine Yard. Our first commitment is to our community. A few months ago, we outlined in our manifesto that we wanted to give our community access to new tools, and encourage PHP developers everywhere to build for the future.Unable to select an option using Selenium’s Python WebDriver
https://keyes.ie/unable-to-select-an-option-using-seleniums-python-webdriver/
2011年7月07日 00:00:00 +0000https://keyes.ie/unable-to-select-an-option-using-seleniums-python-webdriver/I would like to select an <option>child of a <select>using the Python WebDriver. I have a reference to the option WebElement I wish to select, and have tired select() and click() but neither work. What is the correct way to select an ?
I have also posted this question on the Software Quality Assurance & Testing site on Stack Exchange.
Update: Oh dearie me, I just slapped my forehead. Of course it works, it was my fault for calling click() on the default option, which made it look like nothing had changed.Excel2CSV
https://keyes.ie/excel2csv/
2011年6月27日 00:00:00 +0000https://keyes.ie/excel2csv/Small itch scratched.
import csv from xlrd import open_workbook def excel_to_csv(excel_file, include=None): """Convert the data in the excel_file to CSV. Ifinclude is specified, only those named columnswill be included in the CSV.""" # open the Excel file wb = open_workbook(excel_file) # read each sheet in the file for s in wb.sheets(): # create a CVS writer per sheet csv_writer = csv.writer(open("%s.csv" % (s.name), 'wb')) # what columns are included in the CSV?LetterMPress
https://keyes.ie/lettermpress/
2011年6月20日 00:00:00 +0000https://keyes.ie/lettermpress/LetterMPressTM will be a virtual letterpress environment—released first on the iPad—that will allow anyone to create authentic-looking letterpress designs and prints. The design process is the same as the letterpress process—you place and arrange type and cuts on a press bed, lock the type, ink the type, and print. You will be able to create unlimited designs, with multiple colors, using authentic vintage wood type and art cuts. And you can print your design directly from LetterMpress or save it as an image for import it into other applications.Extracting values from a Cherokee configuration file
https://keyes.ie/extracting-values-from-a-cherokee-configuration-file/
2011年6月16日 00:00:00 +0000https://keyes.ie/extracting-values-from-a-cherokee-configuration-file/I need to extract the maximum vserver id and the maximum source id from a Cherokee configuration file, so I can auto-generate configuration for test instances. The following is the solution I came up with:
import os import re def increpl(matchobj): """Replace the include statement with the content of the file.""" inc = matchobj.group(1) return parse(inc) def parse(filename): """Returns the configuration with all includes resolved.""" cfile = open(filename, 'r') content = cfile.Find a random unbound port
https://keyes.ie/find-a-random-unbound-port/
2011年6月16日 00:00:00 +0000https://keyes.ie/find-a-random-unbound-port/find_unbound_port returns a (pseudo-)random unbound port on localhost.
import random import socket # range of ports where available ports can be found PORT_RANGE = [33000,60000] def find_unbound_port(): """Returns an unbound port number on 127.0.0.1.""" port = random.randint(*PORT_RANGE) sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: sock.bind(("127.0.0.1", port)) except socket.error: port = get_port() return port if __name__ == "__main__": print find_unbound_port() gondor.io Initial Thoughts
https://keyes.ie/gondor-io-initial-thoughts/
2011年6月11日 00:00:00 +0000https://keyes.ie/gondor-io-initial-thoughts/gondor.io, a Django application hosting service, has started accepting more people to their private beta. It’s billed as "effortless production Django hosting", and while it’s not effortless just yet, I’m excited to have spent some time investigating what’s on offer.
It took me about three quarters of an hour to set up an Hello World project from scratch, get it deployed, and served from a domain I specified. The only glaring omission from a "getting started" point of view, is access to the log files, but that’s going to be resolved in the next release (possibly next week).Per Instance Settings in gondor.io
https://keyes.ie/per-instance-settings-in-gondor-io/
2011年6月11日 00:00:00 +0000https://keyes.ie/per-instance-settings-in-gondor-io/It’s easy to have different Django settings per instance in <gondor.io>. For each instance create a deploy/settings_<instance_name>.pymodule and specify your settings there.
A simple use case for this is to have DEBUG enabled for a development instance but disabled for production. In this case set DEBUG=False in the project’s settings.py module, and set DEBUG=True in deploy/settings_dev.py (this assumes you have created an instance on gondor called ‘dev’).Nokia C3-01 iSync Plugin
https://keyes.ie/nokia-c3-01-isync-plugin/
2011年5月10日 00:00:00 +0000https://keyes.ie/nokia-c3-01-isync-plugin/Nokia doesn’t provide a C3-01 iSync plugin. I found a post for a C3-00 plugin and there in the comments was a link to a C3-01 plugin.
My only complaint is the phone icon that appears in iSync has a white background and the image of the phone is small. I found a high resolution image and created a new image for the plugin which is available for download.
When you get it replace the image ~/Library/PhonePlugins/Isync Plugin C301.Getting EC2 regions using Boto
https://keyes.ie/getting-ec2-regions-using-boto/
2011年3月24日 00:00:00 +0000https://keyes.ie/getting-ec2-regions-using-boto/The following snippet in the Boto documentation is used to get a list of EC2 regions: import boto.ec2 regions = boto.ec2.regions()
Unfortunately when executed this code raises the following error:
Traceback (most recent call last): ... regions = boto.ec2.regions() File ".../site-packages/boto/ec2/__init__.py", line 38, in regions c = EC2Connection(**kw_params) File ".../site-packages/boto/ec2/connection.py", line 80, in __init__ https_connection_factory, path) File ".../site-packages/boto/connection.py", line 515, in __init__ debug, https_connection_factory, path) File ".../site-packages/boto/connection.py", line 186, in __init__ self.Introducing Noun Pack
https://keyes.ie/introducing-noun-pack/
2011年3月16日 00:00:00 +0000https://keyes.ie/introducing-noun-pack/Noun Pack is an easy way to explore all of The Noun Project’s symbols offline.
The Noun Project currently only provides SVG downloads of individual symbols. Noun Pack provides a ×ばつ24 PNG representation, and the license, of each symbol.
It also provides a montage of all the symbols in a single PNG, a CSS sprite PNG with a transparent background, and sample HTML on how to use the sprite.libjpeg 8c not compatible with PIL 1.1.7
https://keyes.ie/libjpeg-8c-not-compatible-with-pil-1-1-7/
2011年2月28日 00:00:00 +0000https://keyes.ie/libjpeg-8c-not-compatible-with-pil-1-1-7/I used Homebrew to install libjpeg and PIL and got the following error: $ python -c "import _imaging" Traceback (most recent call last): File "&lt;stdin>", line 1, in &lt;module> ImportError: dlopen(/usr/local/Cellar/python/2.7.1/ \ lib/python2.7/site-packages/PIL/_imaging.so, 2): Library not loaded: \ /usr/local/Cellar/jpeg/8c/lib/libjpeg.8.dylib Referenced from: /usr/local/Cellar/python/2.7.1/ \ lib/python2.7/site-packages/PIL/_imaging.so Reason: Incompatible library version: _imaging.so requires \ version 12.0.0 or later, but libjpeg.8.dylib provides version 9.0.0
It seems that libjpeg 8c is not compatible with PIL 1.Nobody does that
https://keyes.ie/nobody-does-that/
2011年2月02日 00:00:00 +0000https://keyes.ie/nobody-does-that/When reading the 1Password Release History I chuckled a little when I got to this bugfix:
Avoiding infinite loop moving 1Password to the Applications folder when the Downloads and Applications folders are the same (Yes, it was a real).
HyperDock
https://keyes.ie/hyperdock/
2011年1月31日 00:00:00 +0000https://keyes.ie/hyperdock/A must have OS X app and an absolute bargin at 9ドル.95.Opening links in a new window
https://keyes.ie/opening-links-in-a-new-window/
2011年1月31日 00:00:00 +0000https://keyes.ie/opening-links-in-a-new-window/A feature request landed in my Inbox today, asking me to change how a document link was working.
The link is to a file that a user uploads, and there are no constraints on the file type. I coded the view to always force a download dialog as I wanted the behaviour of that link to be the same across all browsers, and not be at the whim and pleasure of what plugins are installed.Maintenance Site
https://keyes.ie/maintenance-site/
2011年1月06日 00:00:00 +0000https://keyes.ie/maintenance-site/When I am upgrading a webapp I disable the webapp site and enable a maintenance site. To make sure the maintenance site serves all requests to the domain I add the following mod_rewrite directives to the VirtualHost:
RewriteEngine on RewriteRule ^/(.*)$ http://%{SERVER_NAME}/? [L] IFrame Document
https://keyes.ie/iframe-document/
2010年12月12日 00:00:00 +0000https://keyes.ie/iframe-document/I forget somethings quite frequently. To take the bin out on a Monday morning. To open Google Reader. How to access an IFrame’s document. Writing this won’t help me with my refuse collection or my reading habits but it will help me remember how to access an IFrame’s document.
var iframe_doc = document.querySelector("#iframe_id").contentWindow.document; What odds that my brain does not retain this information for 24 hours?Python Bug Weekend: Preparation
https://keyes.ie/python-bug-weekend-preparation/
2010年11月20日 00:00:00 +0000https://keyes.ie/python-bug-weekend-preparation/Today is the start of the Python Bug Weekend. In order to dive into it (when time permits) I am trying to prepare tonight. After reading the Beginners Guide to Python Core Development I checked out the latest version of the 3.2 repository:
~/Workspace $ svn co http://svn.python.org/projects/python/branches/py3k ~/Workspace $ cd py3k I built:
py3k $ ./configure py3k $ make py3k $ cd Doc; make html and I tested:
py3k $ .Python bug weekend
https://keyes.ie/python-bug-weekend/
2010年11月16日 00:00:00 +0000https://keyes.ie/python-bug-weekend/This coming weekend Python-dev are organising a bug weekend.
We would like to encourage anyone who feels interested in participating to give it a try. Contributing to Python is much less intimidating than it sounds. You don’t need to have previous experience with modifying the Python source; in fact bug days offer a good opportunity to learn the basics by asking questions and working on relatively simple bugs (see "how to get prepared" below).CCC GISTEMP Python 3 Branch
https://keyes.ie/ccc-gistemp-python-3-branch/
2010年11月01日 00:00:00 +0000https://keyes.ie/ccc-gistemp-python-3-branch/I wrote about CCC GISTEMP and Python 3.2 a few days ago. Yesterday I got around to comparing the results versus the Python 2.6.4 results.
Originally I was using Pixelmator to overlay the results of one onto the other, but David Jones pointed out that the tool/compare_results.pyscript. This made the comparison very easy.
If you examine the results you can see that there are some small differences. Unfortunately I don’t have enough knowledge of the code to figure out why this is the case (and currently I can’t devote any time to acquiring that knowledge).CCC GISTEMP and Python 3.2
https://keyes.ie/ccc-gistemp-and-python-3-2/
2010年10月30日 00:00:00 +0000https://keyes.ie/ccc-gistemp-and-python-3-2/I made the following throwaway comment on the CCC GISTEMP mailing list today while talking about the latest 0.6.1 release:
I tried with Python 3.2a2 initially but noticed it won’t run due to syntax errors.
This prompted David Jones to start a new thread:
Ah yes, Python 3. I haven’t done any Python 3 development yet (though I do generally read the release notes). Have you any feel for how difficult it would be to convert to Python 3?The Distros haven’t killed Python
https://keyes.ie/the-distros-havent-killed-python/
2010年10月19日 00:00:00 +0000https://keyes.ie/the-distros-havent-killed-python/I find it very sad that people can’t get past these stupid language wars to even use a piece of software. I find it even more depressing that the same Linux distros that benefited from Python are now basically screwing it over by locking their entire system to antiquated versions. I can see 2.5 but 2.4? Hell we even found someone with a 2.2 Python. Stupid.
Zed Shaw writes that Linux distributions have killed Python.Open Feedback: PayPal
https://keyes.ie/open-feedback-paypal/
2010年10月17日 00:00:00 +0000https://keyes.ie/open-feedback-paypal/Dear PayPal,
Please could you fix it for me to:
download PDF versions of each transaction download a zip file of PDFs for selected transactions navigate between next and previous transactions attach PDF version of receipt to email full-text search my transactions Sincerely yours,
– John
p.s. I was also going to ask if you would allow me to have multiple users for the same account but I discovered that you already support this for business accounts.The curse of ^[[A
https://keyes.ie/the-curse-of-a/
2010年9月29日 00:00:00 +0000https://keyes.ie/the-curse-of-a/Whenever I setup a new machine I install Python from source. One little thing always bugged me though. In the interactive shell a press of the up arrow always resulted in ^[[A being output, rather than the previous command I had entered (similar behaviour to the bash shell). After seeing ^[[A again tonight I decided that enough was enough. A little bit of investigation led me to the readline documentation:Salon.com Scrolling
https://keyes.ie/salon-com-scrolling/
2010年9月21日 00:00:00 +0000https://keyes.ie/salon-com-scrolling/Salon.com ScrollingA Minute With Brendan
https://keyes.ie/a-minute-with-brendan/
2010年9月20日 00:00:00 +0000https://keyes.ie/a-minute-with-brendan/Love love love Brendan Eich’s "A Minute With Brendan" weekly podcast.Python Ireland Unconference
https://keyes.ie/python-ireland-unconference/
2010年9月14日 00:00:00 +0000https://keyes.ie/python-ireland-unconference/Python Ireland are holding their second unconference on October 2nd, in the Dublin School of English. As it’s an unconference, the approach is informal. Talk if you want to talk. Listen if you want to listen. Leave if you want to leave. If you do feel like sharing your Python experience, leave some details on the wiki. I’m hoping to make it along, if I do be sure to say Hi.Transmit’s Progress Bar
https://keyes.ie/transmits-progress-bar/
2010年9月01日 00:00:00 +0000https://keyes.ie/transmits-progress-bar/A short acknowledgement of Transmit’s progress bar.
Transmit’s progress barMailplane & Safari 5.0.1
https://keyes.ie/mailplane-safari-5-0-1/
2010年8月07日 00:00:00 +0000https://keyes.ie/mailplane-safari-5-0-1/Some of the changes in Safari 5.0.1 didn’t sit very well with Mailplane: Chrome cannot find my 404
https://keyes.ie/chrome-cannot-find-my-404/
2010年8月05日 00:00:00 +0000https://keyes.ie/chrome-cannot-find-my-404/While writing a tiny test application today I noticed that Chrome wasn’t displaying my 404 page. I found out that by default Chrome will try to provide suggestions when it comes across such a navigational error.
If this feature is so good, why is Google’s 404 page displayed differently? More importantly for me today though, why is their 404 page working and mine is not?
The secret is to ensure 512 bytes in your 404 page.Changing auth backend on a live system
https://keyes.ie/django-changing-auth-backend-on-a-live-system/
2010年7月25日 00:00:00 +0000https://keyes.ie/django-changing-auth-backend-on-a-live-system/While doing some refactoring I noticed a package that I was only using for an auth backend. I moved the module to the main application package, ran the test-suite and then deployed the changes to the live server.
I then noticed that all responses from the server were error 500s. The trace included in the email alert referred to the package name of the old auth backend. Did I miss something?Same For You?
https://keyes.ie/same-for-you/
2010年7月09日 00:00:00 +0000https://keyes.ie/same-for-you/the dot conf
https://keyes.ie/the-dot-conf/
2010年7月09日 00:00:00 +0000https://keyes.ie/the-dot-conf/When Thursday July 22nd. With registration starting at 10am and the first speaker at 10.30.
Where National College of Ireland, Mayor St, IFSC, Dublin 1.
How much FREE.
More details Watch and listen to the expert:
the dot conf on YouTubeRelease: configpy 0.5
https://keyes.ie/release-configpy-0-5/
2010年6月02日 00:00:00 +0000https://keyes.ie/release-configpy-0-5/While investigating support for compound keys I came to the conclusion that the best way to support them was to rewrite. I’m not a fan of the impulsive “it’s broken we have to rewrite it” clan, but sometimes it’s a necessary thing to do. The previous code didn’t handle dependency cycles gracefully, and the type handling was verbose. I believe I’ve fixed these issues now, and 0.5 will be the baseline for future work.Release: configy 0.3
https://keyes.ie/release-configy-0-3/
2010年5月13日 00:00:00 +0000https://keyes.ie/release-configy-0-3/Comments are not part of the JSON specification, but it is very useful (and sometimes necessary) to have well commented configuration files. I have added support for comments (multi-line and in-line) to configpy, therefore if a configuration has comments it is not JSON. Internally, configpy just strips the comments before parsing. Here’s a brief example:
config_str = """/* We can use single line *//* and multi-lineJavascript like comments */{"var_a": "AAAA", // or simple in-line comments too/* we can mix comments everywhere */"var_b": "You must escape \/* slashes in name or value strings *\/","var_c": "A longer string \/\/ like this one"}""" config = Config(config_str) assert "AAAA" == config.Releases: pathfinder & configpy
https://keyes.ie/releases-pathfinder-configpy/
2010年5月13日 00:00:00 +0000https://keyes.ie/releases-pathfinder-configpy/pathfinder-0.2 fixes a bug in the NotFilter and the project is now registered on PyPI. configpy-0.2 (PyPI) has seen some big changes, the biggest of which is a change to JSON for the configuration format. There is also new expression support, with an unrestricted mode (full access to globals()).Shutdown and restart (automated dev env setup)
https://keyes.ie/shutdown-and-restart-automated-dev-env-setup/
2010年4月28日 00:00:00 +0000https://keyes.ie/shutdown-and-restart-automated-dev-env-setup/A laptop had been my main development computer for the past four or five years, until January. Since then, I’ve been using a Mac Mini and it’s taken me some time to develop a habit for turning it off at night. The reason I dislike shutting the machine down is the time it takes to setup my development environment each morning. This dislike is nothing compared to the grief I give myself for wasting electricity.GitHub Gists
https://keyes.ie/github-gists/
2010年4月15日 00:00:00 +0000https://keyes.ie/github-gists/I discovered GitHub Gists today, so I decided to share a tiny function (Python) I wrote today to get the latest revision identifier for a git or svn sourcepool. A zero tests, zero edge cases, suck it and see approach to releasing little bits of code.Google Follow Finder
https://keyes.ie/google-follow-finder/
2010年4月15日 00:00:00 +0000https://keyes.ie/google-follow-finder/While reading the Google Blog today I followed their link to Google Follow Finder to kick it’s tyres. It’s a simple service, you type in your Twitter username, and it returns lists of people you may like to follow based on a follower-following graph. Of the 10 people (or accounts) returned for me (see below) I am already following 9 of them. I could be wrong, but this seems to counter purpose the app.Football updates on the mobile web
https://keyes.ie/football-updates-on-the-mobile-web/
2010年4月14日 00:00:00 +0000https://keyes.ie/football-updates-on-the-mobile-web/I don’t get to watch many football matches nowadays, so my iPhone is essential for feeding me the latest updates. The two sites I frequent most often to get live updates are The Guardian and the BBC.
While keeping an eye on the Blackburn Rovers versus Manchester United game last weekend, I was annoyed by all the cruft at the top of the page. As you can see in the following screenshots (click for larger size), there is no mention of the current score on either site.404 Not Found
https://keyes.ie/404/
0001年1月01日 00:00:00 +0000https://keyes.ie/404/I’m not very smart. I’m just a web page. I can’t find what you are looking for. Either my creator changed something or you’re bad at typing.
If you are feeling sad
Coz you got a four oh four
Remember that you have friends
Who’ve seen this all before.
I’ll send a message to my boss
And tell him of your trouble
He’ll try his best to stop link-rotAbout
https://keyes.ie/about/
0001年1月01日 00:00:00 +0000https://keyes.ie/about/If you want to know more about me I suggest you head over to my personal blog and look me up on Twitter.Baseline Background
https://keyes.ie/things/baseline-background/
0001年1月01日 00:00:00 +0000https://keyes.ie/things/baseline-background/Tired of creating background images to help you establish your baseline grid? Baseline Background is here to help. It’s a web app that generates a PNG to help establish a baseline grid. It currently generates the background images used by baseliner.
How do I use it? /* generate a 21px tall baseline */ background: url(http://baselinebg.keyes.ie?h=21) repeat; Customizing The following are the supported configuration parameters: h — height; in pixels, 0–500 r — red; 0–255 g — green; 0–255 b — blue; 0–255 a — alpha; 0–255 s — spacing; in pixels, 1–10 Example This is a light grey solid 27 pixel baseline grid.Baseliner
https://keyes.ie/things/baseliner/
0001年1月01日 00:00:00 +0000https://keyes.ie/things/baseliner/Looking for an easy way to overlay a baseline grid on any webpage? Baseliner is a JavaScript tool that can do just that.
How do I use it? The easiest way to use baseliner is the Baseliner bookmarklet, which always loads the latest code.
If you prefer a custom baseline grid can be created directly:
<script src="http://files.keyes.ie/things/baseliner/baseliner-latest.min.js"> </script> <script> window.onload = function() { baseliner = new Baseliner(); } </script> Change Grid Height The default grid is 10 px high.Clickatell-Python
https://keyes.ie/python/clickatell-python/
0001年1月01日 00:00:00 +0000https://keyes.ie/python/clickatell-python/Python interface to the Clickatell SMS Gateway HTTP API.Colophon
https://keyes.ie/colophon/
0001年1月01日 00:00:00 +0000https://keyes.ie/colophon/Colour inspiration from Colour Lovers. Ratios generated by the Modular Scale Calculator. HTML generated by Hugo. CSS compiled from SASS using Gulp SASS. Content hosted on Bitbucket. Automatic build and deployment powered by Wercker. Consistent element rendering by normalize.css. Header icons from social circles by Robby Designs. Colour Palette Charcoal#222222 Dusky Fog#778797 Forlorn#73A2BD High Sky Blue#107FC9 Oceano#DEEEFC Typography Selector Value body 16px h1 1.configpy
https://keyes.ie/python/configpy/
0001年1月01日 00:00:00 +0000https://keyes.ie/python/configpy/A JSON configuration file parser with variable look-ahead and look-behind, and expression support.Jekyll Responsive Embed
https://keyes.ie/things/jekyll-responsive-embed/
0001年1月01日 00:00:00 +0000https://keyes.ie/things/jekyll-responsive-embed/A Jekyll converter plugin that converts YouTube, and Vimeo, URLs into responsive embed markup.
The media URL Mark the URL as being one you want to convert by appending ?jekyll_embed to the URL.
For example this markdown link:
[The Magic Is in The Process](https://vimeo.com/72040407?jekyll_embed)
is converted to:
<style>
.embed-container { position: relative; padding-bottom: 56.25%; height: 0;
overflow: hidden; max-width: 100%; height: auto;
}
.embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
</style>
<div class="embed-container">
<iframe src="https://player.pathfinder
https://keyes.ie/python/pathfinder/
0001年1月01日 00:00:00 +0000https://keyes.ie/python/pathfinder/A python utility to find file paths.python-docraptor
https://keyes.ie/python/python-docraptor/
0001年1月01日 00:00:00 +0000https://keyes.ie/python/python-docraptor/A python API for Doc Raptor (a HTML to PDF/XLS webapp).
Example from docraptor import DocRaptor docraptor = DocRaptor() with open("test.pdf", "wb") as f: f.write(docraptor.create({ 'document_content': '<p>python-docraptor Test</p>', 'test': True }).content) Other Resources Repository PyPI Acknowledgements python-docraptor uses the excellent Requests HTTP library.python-intercom
https://keyes.ie/python/python-intercom/
0001年1月01日 00:00:00 +0000https://keyes.ie/python/python-intercom/A python API for Intercom’s API.
Examples from intercom.client import Client
intercom = Client("&lt;personal-access-token&gt;") Get a User user = intercom.users.find(email='somebody@example.com') Get a Company company = intercom.companies.find(name="ACME Ltd.") Start a conversation # user starts a conversation by sending a message
message_data = {
'from': {
'type': "user",
'id': "536e564f316c83104c000020"
},
'body': "Never gonna ... forget about it."
}
intercom.messages.create(**message_data) Reply to a conversation # admin replies
conversation = intercom.conversations.find(id='10037')
intercom.WordPress Revision History
https://keyes.ie/things/revision-history/
0001年1月01日 00:00:00 +0000https://keyes.ie/things/revision-history/Revision History displays the revision history of a post or page, with links to the content of each revision.