Swap Command and Ctrl for Windows on Mac
Quick registry hack that turns the Mac Command keys into Ctrl keys and turns the left most Ctrl key into the Windows key: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentCon...
Quick registry hack that turns the Mac Command keys into Ctrl keys and turns the left most Ctrl key into the Windows key: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentCon...
The GCC that comes with my Fedora installation doesn’t appear to have a __sync_val_compare_and_swap that works with __uint128_t, so here it is: #undef NDEBUG #include <assert.h> inline ...
I recently reinstalled my HTPC using Fedora 19 and, of course, installed XBMC on it. Here’s how to get Fedora to boot to XBMC without login. First, configure your desktop manager to auto-login. I...
I keep having to Google this, so I thought it’d just put it up here. This piece of code creates a SECURITY_ATTRIBUTES (and SECURITY_DESCRIPTOR) for the Everyone group. Handy for some quick-n-dirty ...
I was looking for a utility that would output every byte at an even offset from a file (e.g. skip bytes at odd offset). I couldn’t figure out how to do it with dd (from the looks of it, it might no...
Use “include:aspmx.googlemail.com” in your SPF record: yourdomain.com. 300 IN TXT "v=spf1 a mx include:aspmx.googlemail.com -all Check your /var/log/mail.log to make sure it’s working as expect...
I’m getting more and more familiar with the GIT workflow, which goes kinda like this: git checkout -b topicbranchX git add somefile git commit -m"commit message" git pull git rebase master git pus...
A few weeks ago I got interviewed by Shanghai TV about the Shanghai hackerspace 新车间 (XinCheJian) that I’m part of. In the interview I demonstrate one of the hacks I did, using a TP-Link router to o...
Do this by adding “-private” to the shortcut in the taskbar. Right-click on the IE logo in the taskbar. Then, right-click on “Internet Explorer” and click “Properties”. In the properties dialog, ad...
(Disclaimer: I’m a Software Engineer for Microsoft China. In this blog I express my personal opinion and none of this constitutes the official nor unofficial opinion of Microsoft.) UPDATE: this is...