.

Javascript Method Chaining, aka Fluent Interface

There are several ways to implement the Fluent Interface in JS, and this is one I was using in a project, and halfway forgot.

Docker on VirtualBox installation commands

This is a short howto about setting up VirtualBox with a Docker environment in it.

Set up a clean Debian VM with the regular install, a 10G disk, and nothing but the SSH server packages. (I have started to just use the Vagrant setup, which uses the username vagrant and password vagrant, in case I want to convert it to a Vagrant image.) Download the VirtualBox Guest Additions CD and, as root, do these things to prep the virtual box to install the drivers.

Run the following.

March for Bernie

I have been working on March for Bernie on the side, for free of course. It's a WordPress site with a theme from Bernie volunteers.

Testing Angular Promises and the $http XHR Service with Jasmine

This is a rough note, because I finally figured this out after several hours of trying. If I'm wrong, please email me, and I'll fix it.

I had a problem because I wanted to centralize my $http requests in services rather than having XHR calls in controllers. My first attempts used callbacks, but I wanted to convert them to promises, which are a lot nicer. Thus, I had to test promises that used $http.

The TDD/BDD Religion, Getting The

I must admit that I'm fully drunk on the Kool-Ade.

The tl;dr : testing isn't just writing tests, but also using mock objects and services to simplify testing, and using package managers to port code to new versions of modules. It takes days to learn how, but it's worth it.

Python Logging to Syslog, and Filtering with RSyslog

This article describes how to use Python's logging library to send logs to syslog. Then, using rsyslog, a fancier syslog, we produce a log of pre-filtered output.

I have a process that runs a few times an hour, and it spits out results to STDOUT, which cron dutifully emails to me.

Search this Site from the Search Box

If you go to the home page you can add a site-limited google search to your search bar. Google isn't too nice about it, but it'll work.

Script to set up Python virtualenv

This script sets up both python 2.* and python 3 virtual environments in a directory.

#! /bin/bash

# sets up the packages/python directory's virtualenvs 
# make sure these envs are in .gitignore
#
virtualenv env
virtualenv -p python3 env3

. env3/bin/activate
for i in pip grip requests setuptools six wheel mysqlclient coverage; do
    pip install $i
done

deactivate

. env/bin/activate
for i in pip setuptools; do
    pip install $i
done

deactivate

Why bother? Because this is a way to redeploy the environment on an empty computer.

Movies about the Great Recession / Real Estate Bubble / Economic Crisis

2010 is upon us, and unlike the Arthur C. Clarke sequel to 2001, wherein the world is exploring space, in the real 2010, the world is trying to find a goddamn job and avoid a huge, double-dip recession and rapid price deflation.

Visual Basics: VB, VBA, MS Office

This is a collection of related notes. I will not be updating them as I'm not using the platform at this time.

They're out of order, but there's a lot of potentially useful information in here. Maybe I'll compile it into a short ebook at some point.

Deleting Articles

I'm preparing to break out the content into a different platform this year, and am culling articles. If you want to get highlights of decent articles that are spotted for deletion, but are really decent, follow me on Twitter @johnkawakami.

Online Ads - oh s- they really work on me

I've been putting ads on here for years, and they have basically failed. On other sites, it's actually OK, making a little trickle of money, which is so weird. Lately, I've been looking at the ads on this site, and sometimes I click them. It's not click fraud because I'm actually interested. So they are working. Then I put up this hideous ad with a big stack of text ads, and I wanted to click more than one of them.

Unreal.

These ads work on me now.

Python Packaging, Development, Git, and an Epiphany about Contemporary Development

So, I have this library, and it's always a pain to release it onto my internal computers (or any computers). Unlike the web apps it's not running from a virtualenv. It's right on the system. Maybe it shouldn't be :/

Anyway, that was my motivation for learning Python packaging. It's not hard, but you have to follow every step in the tutorials, and really repeat them a few times. After a couple tries, I had my "eggs" working locally. I also found out that I'm supposed to use pip to make "wheels" instead. I was behind the times.

Making Some Promises (in Parse, but also relevant to jQuery and Backbone)

What a confusing topic. Unfortunately, if you start wanting to add "library" features to your code, like I did, you have to study Promises.

These are notes about Parse.Promises, and the end product is a small object that caches models.

Please Excuse the Blandeness

Ever have one of those days when the layout looked great in the HTML mock-up, but when it was copied into the theme, it just wasn't right?

That's why I'm using Garland again.

Syndicate content