Monthly Archives: February 2014

Matlab: fseek() bug with uint64 offset

Matlab R2013a/R2013b (probably others) cannot handle uint64 seek offsets. however, Octave 3.6 and Octave 3.8 can work with uint64 offsets. Matlab error, but works with octave offs = unit64(0); %or any number fid = fopen(‘test.dat’); fser = fseek(fid,offs,’bof’); fser will be -1 for matlab, 0 for octave

Matlab: fixing exponential tick labels

Sometimes for large number >10000, Matlab/Octave axes ticks will appear as exponentials. You can fix this for your desired number of digits by: set(gca,’YTickLabel’,sprintf(‘%7d|’,get(gca,’YTick’))) In this example, I used 7 digits.

Compiling Unison file synchronizer on CentOS

Many file servers exist on CentOS, and to get much faster performance in WAN environments, it’s better to have unison on the server as well. If you lack admin access to the server, you can compile Unison manually. but first you have to compile ocaml if it’s not installed. A) compile OCAML (takes several minutes, […]

Bluetooth headsets not recognized in Pulseaudio

I have a few Bluetooth headsets, and some PCs recognize them, while some don’t. I’m sure there is a better solution to this, but for now here’s what I do if I don’t see my headset listed in pavucontrol: sudo pactl load-module module-bluetooth-discover reference:

nmap with Cygwin

As of this writing, nmap is not built-in to Cygwin. Here is how to install and configure nmap so that you can call nmap seamlessly from Cygwin: 1) Download and install the “self-installer” from You do NOT need the WinPCap services, I unchecked those options. 2) in cygwin, type nano .bash_profile and add the […]

Joining PDF files into one

PDF Toolkit pdftk allows joining PDFs simply. let’s say you have three PDF files named one.pdf two.pdf three.pdf. Then type in Terminal: pdftk one.pdf two.pdf three.pdf cat output joined.pdf which will join them into the file joined.pdf. pdftk –help will show you the many other things you can do with pdftk.

Asus P8Z77-M boot device choice

I found that there was no known special hotkey that will allow one to choose which device to boot when powering-up the PC. What I found was to keep pressing Delete key upon booting, which brings you into BIOS setup. Under the Boot tab, scroll to the bottom, where you will see “force boot” choices. […]

7-zip unavailable in 64-bit Cygwin

At the time of this writing, 7-zip was still not available in 64-bit Cygwin. Here’s how to work around this issue by using the Windows 7z.exe from Cygwin. NOTE: This method will not show percent complete (no progress report). 1) install the 64-bit 7zip for Windows from 2) in Cygwin, type nano ~/.bashrc and […]

Windows PC field checklist

Here’s what to check before fielding a Windows PC. 1) Cygwin SSHD server running 2) Cygwin apt-cyg install (if desired) 3) Windows Firewall open on SSHD port 4) Open Windows Firewall to pinging if desired 5) Depending on your preferences, set Windows Update to not update automatically (since this can make your PC reboot […]

Pros/cons of LogMeIn, TeamViewer, GoToMyPC

My work involves data collection from remote, inaccessible sites located around the world. I need to have highly-reliable methods of remote control. So I make sure every PC is Intel vPRO enabled, allowing me to power down, reboot, and even reinstall the operating system remotely from a HTTP vPro internal webserver on port 16992. Checklist: […]