Patrick Galbraith

Web developer - Adelaide, Australia

Uploading files to Salesforce using jsForce 5

There aren’t many examples of how you can upload files (aka ContentVersion entities) to Salesforce using the jsForce library. So I wanted to document what I found while working with the library. Simplest way The easiest way to upload a file is to base64 encode the contents and pass it to the create method. Unfortunately […]

Living in a closed source world

Decompiling C# using dnSpy .NET debugger and assembly editor

Recently I was working on a project where I had to work with a C# library with limited to no code level documentation. DnSpy is a debugger and .NET assembly editor. You can use it to edit and debug assemblies even if you don’t have any source code available…

Simple Template Engine 1

An exploration of frontend template engines

There are a number of different JavaScript template engines. However in this post I just wanted to explore how you would go about evolving from a simplistic approach into something more complex. Faux-Mustache So the simplest approach to converting the template and data into the output we need is to just use String.prototype.replace(). Note I […]

Drawing Animated Curves 9

Using Javascript and HTML5 canvas

After digging through some older projects today I came across this code from FollowThemAround.com used to animate the flight path from the Radiohead tour map. It was originally written in AS3 but I ported it to JS for fun.

RAGEagain 90

Re-experience ABC TV's RAGE again...

Rage is a popular all-night Australian music video program broadcast on ABC1 on Friday nights, Saturday mornings and Saturday nights. It was first screened on the weekend of Friday, 17 April 1987.

Since 1998 rage has posted all their episode playlists online. So I created a website that combines these playlists with YouTube allowing you to travel back through time and re-experience rage’s recent history.

Bookmarklet – Force Youtube HTML5 Embed

Here is a simple JavaScript bookmarklet that replaces YouTube videos embedded using the old flash object embed method with the new iframe embed method. What this means is that you can force a lot of embeded YouTube videos to play with the HTML5 video player. This is particularly useful on IOS devices (iPhone, iPad) with […]

Default Thumbnail Plus 120

WordPress Plugin

Automatically display a default Post Thumbnail image, either the first image attached to a post, or set default images for specific categories, tags, or custom taxonomies. Supports custom fields to ease upgrading. Download: http://wordpress.org/extend/plugins/default-thumbnail-plus    

Truncating Text & HTML with PHP 14

A common occurrence in programming are problems that seem simple on the surface but become increasingly complicated the longer you look at them. While working on the latest version of the Recent Posts Plus WordPress plugin I stumbled upon a variety of issues with text/html truncation which I hope to outline in this post. So […]

Recent Posts Plus (WordPress Widget) 357

An advanced version of the WordPress Recent Posts widget, allows display of thumbnails, post excerpt, author, comment count, and more. Provides options to trim the title and override the post order and type. Also includes a simple template parser so you can override the default output. Download: http://wordpress.org/extend/plugins/recent-posts-plus

AAUMv5 Windows Sidebar Usage Meter 1

Originally created by James Roberts (basefield) I completely rewrote and updated the Windows Sidebar gadget to work with Adam Internet’s new API. Source Code (GitHub) | Latest Version | Whirlpool Thread    

collaGen

Flash app that randomly generates a collage from a series of vectors. Download collaGen_v1-2

Chrono Trigger ZSnes Save Editor 6

Chrono Trigger Save State Editor (SSE) v1.0.1 (29/06/2006) Download Created for and tested with ZSnes Save State v0.6. If you are using any other version you will be alerted upon loading a file. The program was tested on Windows XP SP2 and created with Microsoft Visual Basic 6.0. How to use To use this program […]