Skip to content

{ Category Archives } Uncategorized

Implementing the History interface

The way browser history is implemented, with the History interface, is useful for other things than site navigation. The same idea, basically an extended stack that allows going back and forward, is the same algorithm used for undo/redo, and command line history. It would be nice to be able to do const h = new […]

Extending Parsedown: Block elements

Continuing work on extending Parsedown. See the actual code. Adding block-level elements is not much different from adding inline elements. Kavanot.name originally used <footer> elements to indicate the source of a block quote: <blockquote> Do or do not. There is no try. </blockquote> <footer>Yoda</footer> </blockquote> While marking blockquotes this way is now acceptable, for a […]

Extending Parsedown

I've been spending all my intellectual free time on working on my Kavanot site, so I haven't been doing any independent programming. But that site uses raw HTML, which is a pain to type. So I decided to start using Markdown to make writing easier. After a little trial and error, I decided to use […]

H&R Block Updating Errors

(It's been almost a year since I've posted. My intellectual life is busy with other things) I use H&R Block software to prepare my taxes and have been generally very happy, but this year it would not update the program after January 1. Using the automatic update downloaded the updater but it silently failed. Manually […]

Getting multiple pages in the Amazon Wish List

I figured out how to get all the pages from screen-scraping the Amazon wish list. Basically, look for the "Next" button (it's in a <li class=a-last> element). If that element is present, look for the next page. function getwishlistitems ($listID, $page=1){ // ignore parsing warnings $wishlistdom = new DOMDocument(); @$wishlistdom->loadHTMLFile("http://www.amazon.com/gp/registry/wishlist/$listID?disableNav=1&page=$page"); $wishlistxpath = new DOMXPath ($wishlistdom); […]

Odd bug with Date’s

It's been almost a year since I last posted. I'm still programming, but it's mostly visible on github, especially my trying to help with jquery/globalize by implementing nongregorian calendars. I finally solved a bug that was, um, bugging me. In order to test my Julian Day routines, I needed to create a javascript Date at […]

Creating a PowerShell shortcut

I'm sure there must be an easier way to run a program from PowerShell, but I haven't found anything simpler than & "C:\Program Files (x86)\Notepad++\notepad++.exe" with the ampersand and the full path. I could add "C:\Program Files (x86)\Notepad++" to $env:PATH, but I'd still have to type notepad++.exe file. I wanted some way to make a […]

Scribblish

We love playing Scribblish. It's like the old Telephone game but with pictures, with players alternating writing captions for pictures and drawing pictures for the captions. It's most fun as a non-competitive party game, just reading the cartoons at the end of each round. It's useful as well: we taught it to my daughter's then-boyfriend […]

Running Windows XP in Windows 8

I wanted to run some of my old games (notably Riven) on my shiny new Windows 8.1 machine, but it wouldn't even try to install on a 64-bit operating system. Luckily, Oracle offers VirtualBox to run virtual machines, and Microsoft offers a Windows XP virtual hard drive (.vhd file) through its Windows XP mode for […]

Setting up git

Now that I have my computer working, I want to get back at my github repositories. I could type my password with every push, but it's easier to use SSH with a key pair. Since I'm using Putty for shell access, I use Puttygen that comes with it. The problem is that Puttygen's format is […]