In Loki We Trust The many projects of Lokkju, Inc


ZPAQ homebrew formula added to my taps

ZPAQ is an intellectual property encumbrance free, faster, better archiver. While it's easily available for Windows and most flavors of linux, there is no package for OSX... so here's a simple homebrew formula.

to use this (and the other formulae in my Tap), just add it to your homebrew install:

brew tap lokkju/homebrew-formulae

Filed under: Uncategorized No Comments

Installing Adobe CS 5.5 on a HFSx (case sensitive) root volume

Adobe CS 5.5 (Photoshop, Fireworks, etc, etc) refuses to install on a system that has a case sensitive root filesystem. I've written a workaround/hack that allows it using a combination of a dylib and a case insensitive sparsebundle.

This solution has been tested on OS X Lion 10.7.2

Instructions and code at:

Also included is a demonstration of using DYLD_INSERT_LIBARIES without needing to define DYLD_FORCE_FLAT_NAMESPACE.

Filed under: Uncategorized 5 Comments

usbhid grabbing usb device before VMWare can

Found a small work-around to being able to restore the iPhone 4S firmware from iTuns in a virtual machine today.

In the past, people have been able to use the usbhid quirks mode flag to make it not grab the iPhone device before VMWare does, but for some reason, under Ubuntu 10.04, that was working.

Instead, you can unbind the device from usbhid using the syntax:

echo 2-5:2.2 > /sys/bus/usb/drivers/usbhid/unbind

You numbers will vary, but can be found in your dmesg.

h/t to

Filed under: Uncategorized No Comments

Import all WordPress users into phpBB3

A task I had to pull off as part of some improvements I'm making for, we had to move all the existing WordPress users over to phpBB3, keeping the passwords and the like.

Luckily, this is made relatively easy, because they use the same hashing library, though different default hashes. The following script hasn't been extensively tested, but it worked for me. That said, I also had to bang this out in just a few minutes, and it requires both your WordPress and phpBB3 instances use the same database.


define('IN_PHPBB', true);
define('ROOT_PATH', "/path/to/forum");

$phpEx = substr(strrchr(__FILE__, '.'), 1);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : ROOT_PATH . '/';

include($phpbb_root_path . 'common.' . $phpEx);
require($phpbb_root_path ."includes/functions_user." . $phpEx);

function init() {
	global $db;
	global $user;
	global $auth;
	global $default_group_id;


	$sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = 'REGISTERED' AND group_type = " . GROUP_SPECIAL;
	$result = $db->sql_query($sql);
	$row = $db->sql_fetchrow($result);
	$default_group_id = $row['group_id'];

function walk_wp_users() {
	global $phpbb_root_path;
	global $phpEx;
	global $db;
	global $config;
	global $user;
	global $auth;
	global $cache;
	global $template;
	global $default_group_id;
	$sql = 'SELECT user_login,user_pass,user_email,user_registered,user_activation_key FROM wp_users';
	$result = $db->sql_query($sql);
	while ($row = $db->sql_fetchrow($result))
		echo "processing '" . $row['user_login'] . "' ";
		$error = validate_username($row['user_login']);
		if ($error && $error == 'USERNAME_TAKEN') {
			echo "exists\n";
		} elseif ($error){
		} else {
			$user_row = array(
				'username'              => $row['user_login'],
				'user_password'         => $row['user_pass'],
				'user_email'            => $row['user_email'],
				'group_id'              => $default_group_id,
				'user_timezone'         => '-8',
				'user_dst'              => 0,
				'user_lang'             => 'en',
				'user_type'             => (($row['user_activation_key']) ? USER_INACTIVE : USER_NORMAL),
				'user_actkey'           => $row['user_activation_key'],
				'user_ip'               => '',
				'user_regdate'          => strtotime($row['user_registered']),
				'user_inactive_reason'  => (($row['user_activation_key']) ? INACTIVE_REGISTER : null),
				'user_inactive_time'    => time(),
			$user_id = user_add($user_row);
			echo "added as $user_id\n";



Filed under: Uncategorized 10 Comments

A View of the 2nd Occupy Portland GA Committee meeting.

I debated on posting this, but finally decided I should.

I attended the GA Committee Meeting on Monday night, from about 7:20pm till 9:30pm - and I was beyond disappointed at what I saw. I could write pages about this, but I will try to make a very short list:

1) Very few people had been in a consensus decision making process before, nor understood it.
My opinion is that people who are deciding on a solution to bring to the GA should have experience with it.

2) The people who had used consensus before we not listened to.
Myself and another gentleman repeatedly brought up our position that consensus in a large group was not workable, and that we should use modified consensus from the start. Though the rest of the group stated that they disagreed with us, their actions said otherwise, as they moved on over our objections. The "solution" was to use a 9/10ths model when something was "urgent" - and for those of you that don't immediately see the problem with that, here is a snippet of the paraphrased conversation:

Someone: "if it's urgent, we move to a 9/10ths model"
Me: "Who defines urgent?"
Someone: "It's obvious".
Me: "I don't think it is".
Someone: "well, if it deals with a safety or security issue"
Me: "Who defines if it is a safety or security issue?"
Someone: "it's obvious"
Me: "?!?!?"

At that point, I gave up - because my opinion had already been marginalized, and because it was self evident it wasn't obvious - or else we wouldn't have been discussing it.

3) Many people we unable to think critically about what they said
There seemed to be an ingrained marginalization of people's opinions - and the reasons for them. During a discussion of when it was ok to block proposals, it was stated multiple times that blocks shouldn't be allowed for "arbitrary" reasons. When I pointed out that what is arbitrary to me may be "life or death" to someone else (especially when we get into ethical considerations), that was modified to be "it must be something that addresses a real human need". While that phrasing sounds great, it, again, only changes what we have to define - not that we have to define something. There is no language value difference between "not arbitrary" and "real human need" - they both can mean completely different things to different people, and one person's "real human need" can easily be another person's "arbitrary". In combination with the conversation in (2), it seemed to me that there was willful blindness - and in my experience no amount of talking can overcome that.

As I said, I did end up having to leave early, as my son was getting fussy, so I don't know if things got better - you can all watch the recordings of it and form your own viewpoints.

While I would love to see things work out well at tonight's GA, my fear is many people will feel marginalized - and walk away because of it. If we want true consensus, then we must strive for that, and be aware of the blinders that people naturally wear - that *all* of us naturally wear.

Filed under: Uncategorized 2 Comments

MobileSaver selected for Banking the Unbanked prize

MobileSaver, a little app I wrote pro-bono for CASA of Oregon at a local hackathon, has been selected as the winner for the "Banking the Unbanked" category of AT&T & OneEconomy's Applications For Good contest.

More Here

Filed under: Uncategorized No Comments

Installing Scapy via PIP

it looks like the pypi entry for Scapy is significantly out of date, so instead you can use this command to install Scapy via pypi:
pip install hg+

Filed under: Uncategorized No Comments

Flashing a bricked HP Mini 1000 (1151NR)

Note: This worked with a 1GB USB stick, but not a 8GB one. YMMV.

Update: working rom image now available - this works at least on the 1151NR

You'll see many places around that tell you how to recover from a bad AMI BIOS flash or how to flash a custom BIOS, but it works a bit different on the HP Minis that use AMI. Before trying this, please make sure you have a known good ROM to flash back to if your modified one doesn't work.

As usual, the AMI BIOS will allow you to reflash via an AMIBIOS.ROM file on a USB stick - but it must be DOS bootable, and you must use the *right* control key.


  1. make a bootable DOS USB stick (google for it, there are some tools)
  2. copy any ROM image for your machine model to it (in the case of the 1151NR, a ROM from many of the other HP Mini 1000 models will work).
  3. rename the ROM file to AMIBOOT.ROM
  4. while holding the right ctrl+left arrow key, power on the system
  5. within 10 seconds, you should see the AMI update utility start to do an update, and some dots going across the screen. It may take a couple tries to work.
  6. if you computer didn't automatically reboot, remove the battery and power, then plug it back in and turn it on. You should see "CMOS checksum bad" once, and then it should boot normally.
Filed under: Uncategorized 8 Comments

CivicApps Hackathon – Mobile Apps for Education

Quite a productive event at P.I.E. today, with two very interesting applications being built.

The first is a team SMS application for teachers to send text messages to all their students. It still has some major feature enhancements on the way, including an administration layer for school administration to send out an SMS to all students using the service, but it was working - and a cool demo it was too! You can check it out at

The second app, which I worked on with a team of 5-6 others, is a youth activities calendar aggregator based on the calagator platform. It is intended to be a single place to not only post events (and import events from other sources), but only a resource for posting jobs that are targeted at youth. It is currently fully up and ready to use, and formatted for ease of use on mobile devices, but future improvements include event list exportation in multiple formats, multiple themes - each targeted at a difference type of client device, and possibly event reminders. It is currently at I personally don't like the name, so taking suggestions!

TheStreamPDX was chosen as the day's "winner", and we (the team behind it) will be receiving a Web Visionaries Award.

Filed under: Uncategorized No Comments

MobileSaver: an Applications For Good contest entry

MobileSaver was first concieved of as an idea during a discussion about challenges to the successful completion of IDA programs. A basic design mockup was done prior to the Portland code camp. At the code camp, the UI design was greatly improved, the python code and templates were written, and by the end of the day it existed as a working, usable, application.

MobileSaver is currently a fully working web application, with complete support for iOS, Android, and similar devices. It falls back to basic HTML on more limited mobile browsers, and while not as nice looking is still fully functional. In the future, we'd like to add device capability detection, and specially format the output for some older devices, such as classic Nokia or Motorola browser equipped cell phones. In addition, deposit reminders and notifications; and a communications portal to ask questions of the program manager are in the works.

Voting/Project Page:
Presentation (Including demo video):
Demo Video:
Source Code Link:
Live Beta Link (Outcome Tracker account required):