Jul 21
2012
Here are some notes I made while trying to understand the opcodes in this fun article on generating small elf binaries. Hopefully they will be of use.
00000000 B801000000 mov eax, 1
00000005 BB2A000000 mov ebx, 42
0000000A CD80 int 0x80
In the above snippet:
- B8 is the move instruction …
Jul 21
2012
By default system python loads "fake" readline (fake because it actually uses libedit) from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/readline.so. Even if you install readline (which goes into /Library/Python/2.7/site-packages), it will still load it, even if you fiddle …
May 17
2012
In case I forget again why the window spectrum is computed when doing DFT, the answer is that discretisation leads to aliasing artefacts.
Consider the DFT of a x(t)=1. Its DFT is calculated by calculating the sum sin(2 pi f t)*x(t) and cos(2 pi …
Apr 28
2012
Lyx 2.0 and onwards on OS X will use spellchecker provided by the OS X. Note however that the language it will use for spellchecking is determined by the document's language setting, not your system language setting.
Furthermore, in version 2.0.3, if you change your document's language …
Apr 23
2012
Some notes on using the popular Bluetooth serial module RF-0417C:
- When sending AT commands, do not include \r\n either together or singly.
- It appears to be happy to receive 5V inputs to TX.
- It is not happy to receive 5V to Vcc.
- If you connect a LED, it blinks …
Feb 12
2012
Replacing the SuperDrive with a hard disk seems to be a Bad Idea at least in my 13" mid-2010 MBP: my 320GB WD Scorpio Blue took over a minute to copy 60MB. That is so 80s.
Interestingly, when I put the hard drive back to where it belongs, and put …
Jan 27
2012
- Create a virtual env and activate it
- hg clone https://code.google.com/p/pyglet/
- pushd pyglet; python setup.py install
- popd
- easy_install pyobjc==2.3 # the ==2.3 is required as of 2012-01-27, or pyobjc-core will not install
- python -c "import pyglet" # this step should not fail
Cheers,
Steve …
Dec 18
2011
- No intersecting planes! These confuse the software into making voids without making scaffolding
- 1 unit = 1mm
Cheers,
Steve
Nov 15
2011
The hijack iPhone library implements Manchester encoding for digital communication. Manchester encoding maps 0 to high-low transition, and 1 to low-high transition.
The iPhone library generates the transitions using full or half period of a sine wave, using a full period when a bit run is detected. An example of …
Aug 01
2011
Of all Brendanites, the worst off are the criminals and other malcontents. Water-boarding is par-for-course as is other cruel and unusual punishments, like electric-clamps-on-nipples and listening to boy bands non-stop. By the O'Neill doctrine, if it worked before then whatever it is is OK now and forever. Amen.
While criminals …
May 29
2011
Use git init to create an empty git repository, then edit .git/config to add the svn remotes:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
[svn-remote "svn"]
url = file:///home/steve/code/svn-repos/foo
fetch = trunk:refs/remotes/trunk
branches = branches/*:refs/remotes/*
tags = tags/*:refs …
May 18
2011
svn st | grep '^?' | sed 's/^[? ]*/"/' | sed 's/\$/"/' | xargs svn add
Cheers,
Steve
May 16
2011
It is possible to leave Australia without an overseas SIM card and
Cheers,
Steve
May 08
2011
Here is my firehol.conf that allows multicast mDNS packets through:
# define mdns so we will accept it
server_mdns_ports="udp/5353"
client_mdns_ports="5353"
interface eth+ multi
policy return
server mdns accept
server multicast accept
interface eth+ home src "\${home_ips}"
server all accept
client all accept
Initially I had the server …
May 07
2011
Just finished packaging my engineering thesis project into a more portable format: an altoids tin! I have seen people put some neat stuff inside them, and I am chuffed I managed to as well :) Though I had to cut through the lid for the display. And I only had to …
May 06
2011
Got parts from element14 today: hook probes and right-angle 3.5mm mono plug. Modded my DSO nano probes, replacing the micro-tweezer probes and the connector. Interestingly the factory probed using a stereo connector, but the mono replacement works just as well.
This along with BenF 3.61a firmware upgrade has …
Apr 23
2011

Err99 is a somwhat common error encountered by Canon DSLR users. Because it is something of a catch-all error code a variety of causes and resolutions can be found via google. In my case the error was fixed by a firmware upgrade while it was in the hands of Canon …
Apr 22
2011
Found NGC 4594, aka the Sombrero Galaxy.
In addition also found what is probably cataracts in my eyes \>.\<
Cheers,
Steve
Apr 17
2011
- const char *foo; is not the same as char * const foo; The former declares a pointer to constant char, while the latter declares a constant pointer to char.
- - [NSError localizedDescription] returns the object for key NSLocalizedDescriptionKey in the error's userInfo dictionary. I always wondered how to set it since there …
Apr 15
2011
Finding myself in the position of needing to distribute several apps OTA and unable to use the more well known OTA services like testflightapp.com due to client concerns, I made my own, ICBM.
ICBM is a small python webapp built using my favourite webapp framework, bottle. You just put …