• Almost Mac-like touchpad scrolling in Firefox and Thunderbird on Ubuntu 22.04

    Some time ago, I spent some time trying to configure scrolling in Firefox on Ubuntu 20.04. At the time I discovered Pavel Fatin’s recommendation to launch Firefox with the environment variable MOZ_USE_XINPUT2=1 set. This was a good start, but scroll acceleration was still wonky, and kinetic scrolling was non-existant.

  • Jailbreak an iPhone 3G running iOS 4.2.1 in 2021

    “And some things that should not have been forgotten were lost. History became legend. Legend became myth. And for two and a half thousand years, the ring passed out of all knowledge.” ― Galadriel in The Fellowship of the Ring

  • Twitch chat on original iPad in 2021

    NOTE: The following is almost certainly the WRONG way to do this. The right way is almost certainly to install Theos and create a custom Theos based Makefile to link everything together. (I’ll probably try to do this next)

  • Twitch chat in rirc command-line IRC client

    Today I got the Twitch chat running using the rirc command-line IRC client.

  • Troubleshooting Ubuntu 20.04 on a 2014 MacBook Pro 11,2

    I recently installed Ubuntu 20.04 on my mid 2014 MacBook Pro 11,2. Most things worked out of the box, but there were a few things which required tweaking. The following post records these tweaks. The most useful sources for this post were the Arch wiki pages, specifically the MacBookPro11,x page and the general Mac page.

  • LineageOS Setup

    This post details the particulars of my LineageOS setup for future reference.

  • Things Which Should Be Obvious in Pandas, But Aren't

    I have been brushing up on my pandas skills lately. This post records some details which surprised me.

  • How I set up my Pi

    I have recently reinstalled Raspbian on my Pi. The following is a record of the steps I followed to get everything how I like it. (I’m doing this mainly as a reminder for my future self, but you might find it interesting.)

  • New YouTube Series

    I have recently started a YouTube series comparing how easy it is to do various tasks on Windows, Mac and Linux. Because this involves screen recording, I have started the series by comparing screen recording on each OS.

  • TTY Launcher for pbLua

    I’ve been experimenting recently with pbLua. PbLua is custom firmware for Lego Mindstorms NXT robots which allows you to program them with Lua, rather than the incredibly annoying graphical program they ship with the kits.

  • Broken Disqus Comments

    I have had this Octopress blog for some time now, but I’ve never been able to get Disqus comments working. Up until now, that is.

  • Quick Python Tutorial for C People

    Python for users of C-like languages:

  • Python, PyObjC, ScriptingBridge and AppleScript

    I’ve recently been investigating the best way to control Keynote from another application. I know it’s possible with AppleScript, but AppleScript confuses me, so I thought I would try to avoid it.

  • Git forks

    I was recently trying to contribute to a Homebrew formula, and I realised I knew absolutely nothing about working with other people’s git repos. Fortunately, I found this blog post, which basically covered all the things I needed to know. I’m putting this post here, so I can find it next time I forget how to do it, but it might be useful for you too…

  • Finding parts per million (ppm)

    Everyone gets very confused when they try to learn how to convert from \(\textrm{g}/\textrm{l}\) or \(\textrm{mg}/\textrm{l}\), or \(\textrm{mg}/\textrm{g}\), or something similar, to \(\textrm{ppm}\). However, the process is almost identical to finding a percentage. To find a percentage (parts per hundred), you take the part, and the total and do the following:

  • Rbenv ruby gem absent after gem install

    I thought it would be fun to install lolcommits, which automatically takes a snapshot of you and captions it with your git commit message whenever you do a commit. However, after following the simple installation steps, it appeared that lolcommits wasn’t actually installed. I tried to enable it in one of my repos, and found that the command was not in my $PATH.

  • Onomatopoeia

    Is my only fear.

  • Faster Vim Macros

    Today I needed to run a custom Vim macro 76 times to automatically insert the same (long) entry under a bunch of different Python dictionary keys. I started the macro recording, typed the first ‘template’, then ran it with 76@q. However, it took a very long time. I decided to find out why it took so long.

  • Installing a compression proxy on a Raspberry Pi

    My friend has a very low data allowance on his internet plan, and mentioned he was using a German compression proxy to compress website data upstream. I thought that it should be possible to set up my own compression proxy on a Raspberry Pi, and after a bit of research discovered ziproxy. Installation on Raspbian was simple:

  • Setting up Emulationstation on a Raspberry Pi

    I recently installed emulationstation using petrockblog’s RetroPie-Setup script. However, I had a few issues getting emulationstation to work correctly.

  • Experimenting with \(\KaTeX\) and \(\LaTeX\)

    If this works, I have successfully added MathJax \(\KaTeX\) support to my blog.

  • Haunted

    A Poem…

  • Git problems

    I was recently messing around in the git repo for this website, and suddenly, I couldn’t add a certain folder. I would run git add <folder>, but git commit and git status both said that there was nothing to commit (working directory clean). I tried removing the directory and re-adding it. Didn’t work. I tried removing it from git with git rm. It said that 'folder/' did not match any files. Finally, I did git-ls, just to see what was actually in the git index. The directory name was there, but none of the enclosed files were listed. Next, I tried git rm --cache folder/. Still didn’t work. Finally, I tried git rm --cache folder. Notice the difference between this and the previous command? All I did was remove the / from the end of the folder name. This successfully removed the entry in the git index, and I was able to add the directory again, and everything worked.

  • If you can cook you can program (and vice versa)

    Of course, it isn’t quite that simple, but the basic ideas remain the same.

  • Vim + Python

    I’m writing this post, not because there is a dearth of blog posts about getting Vim to play nicely with Python, but because the blog posts I followed referenced outdated versions of the python syntax highlighting scripts.

  • Experimenting with code blocks

    Now for some fancy formatting!

  • Formatting glitch.

    Mysterious formatting problem

  • First Post!

    Now With Octopress!

  • Steam for Windows on Mac in Wine

    I use a Mac, but occasionally I want to run Windows games. I usually try to use Wine if possible, because it means I don't have to reboot to run my games. The other day my friend told me about a cool sounding game on Steam, and suggested I play the demo. The catch? It was only released for Windows. I decided to try installing Steam for Windows in Wine, but every time I tried to run the installer, it gave me the following error message:

    wine: Bad EXE format for Z: /path/to/SteamInstall.msi

    At first I thought it was a problem with Wine, but after some research I found the following forum page, in which a helpful person called "schtufbox" gave instructions on how to execute .msi files in Wine.

    Apparently (and this worked!) instead of typing

    wine ./file.msi

    you type

    wine msiexec /i file.msi

    I tried it and it worked! Yay!
  • Disk image: No mountable file systems

    I downloaded a disk image recently, but it refused to mount, complaining that there were "no mountable file systems". I tried redownloading it, because I knew that this error can be due to incomplete or corrupted disk images, but it still refused to open. After reading through countless webpages which told me to use long convoluted methods and third party data recovery software, I finally found a nice short Terminal command that worked on this site. The command was

    hdiutil convert /path/to/yourfile.dmg -format UDRW -o newfilename.dmg

    After using this command, a new disk image was created, which worked when I clicked on it. =D
  • Some Python Programs

    I’ve recently written a couple of programs using Python. They are both text based programs designed to be run from a command line. The first is designed to help learn about the charges on common ions, and can be downloaded from here. The second is a command line based version of Minesweeper, and can be downloaded from here. Both programs are very much alpha versions, but they should work. You will need Python 3 to run them, which can be downloaded from here. NOTE: The Minesweeper game relies on the *nix curses module, and won’t work on Windows.

  • History and Memory: Mark Baker's Fiftieth Gate.

    I've uploaded some notes on Mark Baker's Fiftieth Gate here, in case anyone studying the HSC module "History and Memory" wants to look at them.
  • Problems updating iPod Touch 4th Gen to iOS 5

    I downloaded the new iOS 5 update for my iPod Touch this morning, but when I tried to install the update, it told me that it could not restore, as there was an internal error. I hit google, and looked through numerous potential fixes, before finally deciding that I would have to force restore it. As a last resort, before force restoring, I decided to try a different cable, as the one I was using was a little frayed. I was pleasantly surprised when the iPod happily backed up and restored. The moral is of course, that if your iPod isn't updating properly, there might be a problem with your cable.
  • Spoofing a MAC address in Snow Leopard (Mac OS X 10.6)

    I heard that it was quite easy to spoof a MAC address in terminal, and thought it would be interesting to try it out on my own network. After reading through a number of sites which listed commands for 10.4, I finally found a method that works in 10.6. This worked for both wifi and ethernet.

    • First disconnect from the network if you are already connected. For ethernet, this involves disconnecting the cable. For wifi, it may be a bit trickier if you have instructed your computer to remember your passwords, as it will keep reconnecting, and there is no disconnect button. You can't just turn the wifi off either, as ifconfig will return an error. There are two possible methods for disconnecting from a wifi network without turning it off – the Terminal way, and the non-Terminal way. The Terminal way is easiest, and I don't know why you'd use the other method, unless you really hate using terminal. (Which is pointless, because you need Terminal to do the next steps anyway...)
    • The Terminal method is to copy the following into terminal, press return, enter your password, and press return again:

      sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -z

    • The non terminal way to disconnect from a wifi network is to go to the wifi menu in the menu bar, and select "Join Other Network..." (This may seem counter intuitive,  but bear with me.) A dialogue box will appear asking you to enter a network name. Instead of following instructions, click the button in the lower left that says "Show Networks". This will display a dialogue box with all the networks available. Select the network that your computer keeps wanting to join, but type a random (wrong) password into the password box and press join. The computer will try to connect, but will be unable to. After a message appears informing you that your computer cannot connect, press cancel, and proceed to the next step. (If your computer reconnects to a different wifi network, repeat these steps with that wifi network, until it is not connected to any wifi network.
    • Now that you are disconnected from the network, open Terminal, and type the following command to find out what your current MAC address is:
      • For ethernet, type: ifconfig en0
      • For wifi, type: ifconfig en1
    • In both cases, the current MAC address will be found after the word "ether", and will look something like this: 00:11:22:33:44:55
      • MAC addresses are hexadecimal, so they can include letters from a to f
    • Record your current MAC address somewhere, in case you want to change it back.
    • Assuming you know what MAC address you want to spoof, type the following command, replacing 00:11:22:33:44:55 with the MAC address you plan to spoof.
      • For ethernet, type: sudo ifconfig en0 lladdr 00:11:22:33:44:55
      • For wifi, type: sudo ifconfig en1 lladdr 00:11:22:33:44:55
      • When you press Return, the computer will ask for your password. Enter your password, and press return. The MAC address should be changed. To confirm, type ifconfig en0 for ethernet, or ifconfig en1 for wifi.
    • Your computer should now be displaying a different MAC address. Note that the MAC address will reset to the original MAC address on restart.
    If this didn't work, go back and make sure that you are disconnected from all networks. Ethernet cables should be completely unplugged, and wifi should be on, but not connected to anything.
  • A Brief History of Quantum Mechanics

    This website gives a broad overview of the development of quantum mechanics.

    A Brief History of Quantum Mechanics
  • Lego Mindstorms NXT on Snow Leopard (Mac OS 10.6)

    The other day I pulled out my lego robotics kit, and put together a little robot. To program it, you have to install an application off the CD that comes with it. I put the disc in, installed the program and launched it. After waiting several seconds, the app loaded, then quit. I repeated this process multiple times, and concluded that the app was broken. After trying many different fixes suggested on the web, I finally found one that worked. It turns out that Lego Mindstorms NXT relies on an outdated version of flash to run. I downloaded the uninstaller off the Adobe website and uninstalled flash, then uninstalled the lego program, then ran the installer again. This time it installed flash 8, instead of flash 10 which I was using before. Amazingly, the program worked. It's not the most desirable workaround, because I'm forced to use an outdated version of flash, which probably has many more security vulnerabilities. However, it was the only workaround that worked. Hopefully Lego will put out an updated version of the software that works with the latest version of flash.

    UPDATE: After installing NXT with flash uninstalled, so it installed its own version of flash, my dad discovered that it continued to work when he updated back to flash 10... Obviously it needs to install flash eight, but doesn't care what you do once it is installed.
  • Running Classic Apps on Snow Leopard

    I came home today, and found my mum trying to get an old pre-OSX game to work on our mac running Snow Leopard. In preference to digging out one of our old macs, I thought it might be a good idea to try and find a classic OS emulator on the net. It didn't take long to find one, but having downloaded Sheepshaver, I couldn't get hold of a working ROM. I tried all the strategies suggested on the website, including trying to extract the ROM from an update, but to no avail. Having given up on that, I searched the web for sites with ROMs available for download. I eventually found one, but none of the ROMs worked. Finally, just as I was about to give up, I found a site which explained everything beautifully, and included a link to a working ROM. After following all the instructions, and finding everything worked perfectly, exactly as described in the article, I decided to post this post to make it that much easier for other people to find the page. So, after all that, here's the link.

    Hopefully you'll be up and running a lot faster than I was.

  • Murphy's Law

    Murphy's Law states "If anything can go wrong it will go wrong." The question is "Can that be proven conclusively?"
    My dad and I were theorizing about it a while back and came to this paradoxical conclusion- Murphy's law cannot be proven wrong in any circumstance. Murphy's law is always proven wrong in every circumstance.
    See if you can work out how it works!
    Edit: Here's how it works.
    If something goes wrong, then nothing has gone wrong with the law. Thus something that can go wrong hasn't.

    If something hasn't gone wrong, then the something has gone wrong with the law
  • The Day Our Electricity Stopped

    Here’s a poem I wrote. (Edit: A long time ago…)

  • First Blog

    Hi everyone who's reading this. This is my first blog. I'm planning to put any poems I write that I think you might find interesting (or photos I take, or anything else that interests me). I hope you like it.

subscribe via RSS