A totally unnecessary but cool change to my internal tools: realtime deploy lgos in my SaaS. 
 Here’s what it looks like: 
 
 
 


 
 
 Table of Contents 
 
 
 Storage for deploy logs: a sqlite column. 
 The storage approach 
 The presentation 
 Future improvements 
 
 
 
 


 Storage for…
I’m about to launch a new analytics SaaS. Easily the biggest project I’ve ever taken on myself. I don’t usually finish ANY projects so this is a big life goal for me. 
 I have humble goals for myself: get two subscribers by the end of the year. There’s six months left to the year so if I can average bringing in a third-of-a-person each month I got that goal in the bag.…
I just finished a task with GPT-5.4-mini. Here’s the session summary from oh-my-pi (an agent harness) : 
 Tokens 
 Input : 3_648_340 
 Output : 61_676 
 It was a hefty 30 min session. I (we?) mostly tweaked how Service A loads two sqlite databases. It now loads them per request instead of once when the service starts up. The agent had to investigate multiple services from the…
I recently read this blog post on the pains of load testing . I want to focus on two pain points pulled right out of the post: 
 
 
 Most load testing tools support simplistic workloads, and even the complex ones don’t let you do everything that’s realistically needed to simulate real usage of a web application. 
 
 
 
 
 Writing the test with a…
If you don’t use the minimap in VS code you probably turned it off a while ago (like me). I thought it was small and useless unless your code has a very distinct structure. 
 It’s kinda like sublime’s minimap: 
 
 
 
 But… 
 I was recently perusing the options in VS code and noticed you can change the size of the minimap. There’s 3…
This used to be an old blog of mine. So much has changed in 12 years. 
 Then and now 
 It used hosted on Github Pages. Now it’s on Cloudflare pages (or is it Cloudflare Workers?) 
 It used to run using jekyll (ruby). Now it’s running on hugo (golang). The first public release of hugo was July 5, 2013 
 It’s not just the tech that changed. My life is totally…
A while ago, I forked the ActiveAndroid repository to add some of my own changes to the ORM framework. Today I wanted to use the library again, use the new changes that the original maintainer has implemented, and also use my own changes. It turned out to be easier than I thought, despite there being 112 commits between the original repo and my forked version. Here’s what I did 
 $ git…
I have a VPS server where I’m compiling CyanogenMod and some android kernels. To compile CyanogenMod we need to pull some vendor specific “prebuilts” i.e. binaries. Connecting the server to the device connected to my laptop is actually quite trivial. 
 First we put adb in TCP/IP mode 
 adb tcpip 8001
 
 Then, let’s forward the that same port to the…
Here’s a small overview of my progress in fixing bug #924609 . 
 Finding the code 
 We know how to replicate the video app’s thumbnail functionality. We just need to find the relevant code that generates (or doesn’t generate, in this case) a thumbnail for an attachment. 
 Here’s the path I took to find the relevant code 
 
 Compose.js - handles the UI…
In this post I will talk about my experience with building the Firefox OS emulator. It’s a simple process but the documentation is spread out over a couple of pages in the MDN. 
 Getting the code 
 The Firefox OS project is based on the Android project and is spread out over many Github repositories. The following commands fetch the code from the servers. 
 git clone…
In this post, I walk through the implementation of the Edit Note screen pictured below 
 
 
 
 Intuition fails 
 The Edit Note section is very similar to the New Note section. My first instinct was to use the same section for both purposes and modify them in javascript according to which mode we were in. This is the essence of the Don’t Repeat Yourself…
In this post, I will polish up the application and address one of its shortcomings: hidden list items. I did not test the list functionality fully when developing the application. This is what caused the bug to slip under the radar. 
 The Problem 
 The Problem can be summed up as follows. The scrollable section’s height was set to 100%. This means the height will be equal to…
I have volunteered to help fix a bug in Firefox OS. The bug is pretty small. It can be summed up as follows. When you attach a video to the SMS application, it shows a generic icon. Ideally it should show a thumbnail preview. In this post, I will explain my understanding of how the Gaia video application generates a thumbnail from a video. 
 MediaDB 
 MediaDB is the shared library that…
This is the final day in which I worked on the Simple Notes application. I implemented a due date for each note. 
 Selecting a date 
 Firefox OS comes with a native date picker optimized for mobile layouts. In order to call forth this date picker, one has to simple add the following input element to a form. 
 < input type = 'date' > 
 And said Date picker looks like this 
…
The next functionality I decided to implement was the ability to delete multiple notes at once. I originally planned to implement this functionality along with the index section, but there were a lot of little details that I overlooked during the planning phase that set me back. 
 Edit Mode 
 The user enters the multiple-deletion mode by pressing a button. I used the EditMode BuildingBlock…
In this post, I will outline the modifications I did to the Simple Notes app in order to create the index screen. 
 Sectioning 
 The first order of business was separating the Index from the New Note section. I used the same CSS rules from the BuildingBlocks Transitions post. With these rules I could use the following structure to separate the sections. 
 < section role = 'region'…
Over the next couple of days I will be creating an application that will store notes for the user. I will not spend more than 4 days working on it, so my top priority will be basic functionality and polish/features will follow afterward. 
 Today I will tackle the New Note screen, as it seems like the most difficult part of the application. 
 Database Structure 
 The database model used…
In this thread I will cover my experience building the Gaia interface from the source code. I followed the Quickstart Guide at MDN. 
 
 Note: I used a linux distribution based on Ubuntu Precise (12.04). This is not meant to be a guide, I’m just merely documenting my experience. 
 
 Getting the Source Code 
 The source of the Gaia interface is located at…
This post will explain a caveat of the IndexedDB API that I have encountered and my work around. 
 The Caveat 
 Part 1 of the IndexedDB posts explains that it’s possible to store objects using a keyPath and autoIncrement . The documentation states that the key will be stored in object[keyPath] if it doesn’t exists already. This is not true. Examine the following code 
 //…
In this post we will wrap up IndexedDB by exploring cursors and indexes. Make sure you read part 1 and part 2 . 
 Cursors 
 A cursor allows an app to iterate through all the results of a query in a manner that does not block the main UI thread. Opening a cursor is simple, just call openCursor() on an object store. It returns an IDBRequest object. The result of the request will be the…
In this post, we will cover how to add, get, update, and delete records from IndexedDB . 
 Transactions 
 All of these operations are done through the respective methods in the object store interface. The only way to access an object store is through transactions. 
 IndexedDB is a transactional database, so any changes to the database are passed through a transaction context.…
In this post, I will introduce IndexedDB . As the name suggests, it is a lightweight database. It’s not a relational database however, it’s a key-value database. It maps keys to javascript objects (or primitives). The API is a little more difficult to grasp than the other APIs offered by Firefox OS so this post is broken up into two parts. The first part will talk about how to create…
This post will give a short demonstration of the Device Storage API . 
 The storage types 
 Firefox OS divides the storage into the following storage areas. 
 
 apps : This storage area is used to store the user data needed by apps. Only available for certified application only. 
 music : This is the storage area where music and sounds are stored. 
 pictures : This is the…
This post documents my experience submitting a bug report to the Firefox OS project. The bug resides here . Hopefully it’s not a duplicate (I searched for a while), and hopefully it will benefit the project in the long run. 
 Stumbling on a bug 
 I found the bug while messing around with the Contact API . When an application wishes to use the Contact API, the system will present a…
The Contacts part of the API Showcase application does not show a lot of information to the user. All the information is displayed in the console. A good way to remedy is to use the Status building block. 
 The Simplest 
 This is by far the simplest building blocks to use by virtue of the implementation of the building blocks demo ( download here ). In order to take advantage of this,…
This post will show one way to implement the Confirm dialog from the building blocks. We will ask the user confirmation when deleting all contacts. We will be using the Transitions to show and hide the dialog. 
 Importing 
 Like all BuildingBlocks components, the Confirm dialog must be imported. Download the building blocks sample application , and copy 
 
 style/confirm.css 
…
Last post we explored the Contact API, but ran into permissions problems. This post, we’ll show the fix and show the last part of the contacts API. Try the (working) demo and check out the source code . 
 Wiping the slate 
 The most destructive API call in is by far the clear() command. It will remove all contacts from the device. The system does not step in and warn the user while…
In this post we will be exploring the Contact API . 
 Creating a Contact 
 The code to create a contact differs between Firefox OS v1.2 and v1.3 
 var contactData = { 
 givenName : [ 'John' ], 
 familyName : [ 'Doe' ] 
 } 
 
 // V1.2
 var person = new mozContact (); 
 person . init ( contactData ); 
 
 // V1.3
 var person = new mozContact (…
On the previous post , we finished implementing a drawer but we didn’t have true navigation functionality. The drawer simply changed the button that the user was able to click. In this post, we will use Transitions . 
 The Structure 
 We will separate our app into three parts. Let’s start with the Notification section 
 < section id = 'notification' role = 'region'…
Building on our previous work , we’re going to separate the notification demos, from the alarm demos using the Drawer . Download BuildingBlocks here . 
 First Attempt 
 According to the documentation, all we need to implement the drawer is to import 
 
 headers.css 
 the style/headers folder 
 drawer.css 
 the style/drawer.css folder 
 
 Then we can…
Before we keep exploring WebAPI, we can take a moment to build a UI foundation our API Showcase app. I previously mentioned Gaia Building Blocks. It’s a mini GUI framework for Firefox OS. So far, the application only showcases 2 APIs: Notification and Alarm. Let’s examine the Button building block 
 Downloading 
 You can download Building Blocks here . This is an archive of the…
This post will cover the Alarm API . Instead of creating a brand new application, we will modifying the API Showcase app. As always, I would encourage you to try the demo . 
 Permission 
 The Alarm API requires alarms permission. The following is required in the manifest file 
 "permissions": {
 "alarms": {
 "description": "Required to schedule alarms"
…
This article will show how to use the Notification API . We will be building the app API Showcase through the rest of these series to quickly test each new API. Try the demo of version one 
 Note: This is the icon for the new application 
 
 
 
 Permission: Manifest 
 Unlike the previous post, the Notification API requires requesting a permission. This can be done…
In this post were going to explore the (small) BatteryManager API . 
 BatteryManager is returned by navigator.battery . You can interface with the object in the following ways 
 
 level 
 chargingTime 
 dischargingTime 
 
 The battery manager also dispatches the following events 
 
 levelchange 
 chargingchange 
 chargingtimechange 
…
In this post, we modify the previous app to create an analog clock using images. Try the Demo 
 HTML: 
 <!DOCTYPE html> 
 < html > 
 < head > 
 < meta charset = 'utf-8' > 
 < title > Simple Clock: V2 </ title > 
 < script type = 'text/javascript' src = 'js/app.js' > </ script > 
 < link rel = 'stylesheet' type = 'text/css' href = 'css/style.css' > 
 </ head >…
In this post, we create a simple clock app. 
 HTML: 
 <!DOCTYPE html> 
 < html > 
 < head > 
 < title > Welcome to JS Bin </ title > 
 </ head > 
 < body > 
 < h1 id = 'clock' > Time </ h1 > 
 </ body > 
 </ html > 
 We are going to just replace the text inside the H1 with the id clock . 
 CSS: 
 h1 { 
 position : absolute ; 
 top : 50 %…
This post will give an overview of Firefox OS. The audience are developers of mobile applications. 
 WebAPI 
 The most interesting part of the OS to a developer is the API. The APIs provided by Firefox OS are officially called WebAPI . They control access to the device hardware. The APIs are drafter by Mozilla, implemented in the current version of Firefox OS, and then submitted to the W3C…
This is the first entry to the blog series dedicated to developing mobile applications for Firefox OS . 
 Hello, Firefox OS 
 Firefox OS apps are created using the standard web technologies: HTML, CSS, and Javascript. Let’s create three files that test the basic functionality of each of these technologies. 
 HTML: 
 <!-- hello.html --> 
 < html > 
 < head > 
…