yes, this is still on. and now it is on a new server with new code, even though it looks the same.

i still need to knock together the "writing a post" bit of code so that i can post without using manual SQL queries. details.


it turns out that this thing is still on. it is kind of funny to me that it still just chugs along, but such is the joy of writing your own software running on your own (virtual) server. it is long past time to rebuild the infrastructure here, which may or may not happen. but it is something that i am thinking about again.

let’s encrypt

this domain is now using a certificate from the let’s encrypt project. they are scheduled for general availability in a couple of weeks.

it’s a great idea. getting free domain certificates has always been more annoying than i was ready to deal with, and once this is all fully baked, it will make it easier to just make everything encrypted by default.


it turns out that the county of los angeles regulates the use of point-of-sale systems that use barcode scanners. one requirement is that you have a customer-facing display that shows prices as they are scanned.

after investing in a lcd pole display (for about $175), i had to bang together a way for scat to feed data to the display. and thus was born lcdpoled, a very simple daemon that listens for stuff to display.

i need to do some more work to make it as seamless as i would really like, but i think i have done enough to get us through an inspection if and when they stop back in to do that.

siamang: a web-based command-line client for mysql

Siamang Main Screen

because i have many more important things to be doing, i procrastinated by whipping up a little web-based command-line client for mysql. what does that mean? you load the webpage, start typing in sql commands, and it presents the results to you. it is just a weekend hack at this point, and has a lot of rough edges. it does have some cool features, though, like a persistent command-line history using Web Storage.

probably the biggest limitation is because it not maintaining a persistent connection on the backend, you can’t use variables, temporary tables or transactions.

it was really born because i was getting frustrated running queries using the command-line client and having the ASCII table look all wonky because it was too big for my terminal screen. html makes that pretty much a non-issue. it is also tablet-friendly.

Siamang Example Table Result

it was also an excuse to play with a few things i was interested in, like knockout. the whole thing is under 400 lines of code/html right now, but by leveraging bootstrap and knockout, it actually looks pretty polished and functional.

the name comes from a type of gibbon, which seemed to be unused in the software world.

you can find the source on github.

the old samurai

the old samurai is a film that celia produced and i helped out on a little bit. enjoy!

grand central market redux

grand central market

i’m excited to hear that the grand central market is going to see some upgrades. it was almost twelve years ago when i was serving jury duty and stumbled on the grand central market for lunch, which helped the plant the seed for me to move downtown a couple of years later and set the stage for all the awesome things that have happened since.

the market seemed to be having a fairly rough go of it ever since i moved downtown, even before competition like the new ralphs market opened. the hours didn’t really accommodate the new residential influx, and few of the vendors seemed to notice what was happening in the neighborhood around them. i am optimistic that with many of the existing vendors having long-term leases already, they won’t be priced out, and their presence should help keep the market grounded and accessible to the diverse downtown community.

wonton’s gluten-free dog treats

this was adapted from a recipe found online. some ingredients were changed and added, and the amounts were also changed so this makes just one half-sheet baking pan of treats. wonton loves these.

¾ cup bob’s red mill gluten-free all-purpose baking flour*
½ cup rolled oats
¼ cup potato starch
⅛ cup flax seed
¾ cup hot water
⅛ cup natural peanut butter (just peanuts, no added ingredients)

pre-heat the oven to 200°F.

combine dry ingredients. mix hot water and peanut butter. add to dry ingredients and mix into dough.

roll out to ¼" thick, cut into bite-sized treats (or use a bone-shaped cookie cutter). you may need to use more potato starch or flour to prevent sticking.

bake for two hours on parchment paper on baking sheet.

turn off the oven, and let the treats cool and dehydrate more thoroughly in the oven overnight.

* the original recipe called for chickpea (garbanzo bean) flour, but i’ve never tried using it. the gluten-free all-purpose flour contains chickpea flour and some other ingredients, and seems more readily available.

cranking along

a few weeks ago, i got it in my head that the ideal time to switch to using scat, the web-based point-of-sale system that i have allegedly been working on for almost 18 months, would be after the new year. this is despite the fact that it was barely even a rough prototype of some ideas. but i’ve been cranking along on it over the last couple of weeks, and it looks like i might just have something that we can use by my arbitrary deadline.

it’s still just barely a rough prototype of ideas, but i there should be enough there on the surface for us to be able to use it, and needing to fill in the gaps because we are actually using it will probably provide plenty of motivation to make it better.

even in the very rough state it is in, it should alleviate some of the pains of our current system. and save us the $30/month we were paying for not-very-helpful support and slow-to-arrive upgrades (trading that for my time to support the new system, of course).

banker’s round for mysql

for some reason, nobody has ever exposed the different rounding methods via mysql’s built-in ROUND() function, so if you want something different, you need to add it via a stored function. the function below is based on the T-SQL version here.

  RETURN IF(ABS(val - TRUNCATE(val, places)) * POWER(10, places + 1) = 5 
            AND NOT CONVERT(TRUNCATE(ABS(val) * POWER(10, places), 0),
                            UNSIGNED) % 2 = 1,
            TRUNCATE(val, places), ROUND(val, places));

use at your own risk. there may be edge conditions where this fails. but this matches up with the python and postgres based system i was crunching data from, except in cases where that system gets it wrong for some reason.

one thing you might notice is that it does not use any string-handling functions like the other “correct” solution floating around out there.

comments closed

i get tired of dealing with spam on very old entries here, so the comments now automatically close on posts after one week. you know, on the off chance that i ever post anything of interest again.