Ben McCann

Co-founder at Connectifier.
ex-Googler. CMU alum.

Ben McCann on LinkedIn Ben McCann on AngelList Ben McCann on Twitter

Tips and Tricks

Google video chat volume on Windows


I frequently use Google video chat. It was common for the person on the other end to have difficulty hearing me, which I eventually realized was because the microphone level kept being auto-adjusted to very low levels. It turns out that it was Google video chat constantly auto-adjusting the volume level and that the behavior Read More

Running Ubuntu on VirtualBox


I had to figure out a few things to get Ubuntu installed and working well on VirtualBox. I had to enable virtualization technologies in my BIOS. I have a Lenovo T520 and did this by pressing F1 during startup and then going to Security > Virtualization. If I did not do this then I would Read More

Sed Cookbook


The Linux sed command is a stream editor. What that means is basically that you can do a regex operation on each line of a file or a piped stream. You can also use perl like sed. Sed does not use the extended regex syntax. Sed regex reminders: You need a backslash before parens in Read More

Remote Java debugging in Eclipse


To debug a Java program being run on the command line from Eclipse you can start the Java program in remote debugging mode: java -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y -jar myProgram.jar The program will wait for you to attach the Eclipse debugger to it. Open Eclipse and choose: Run > Debug Configurations… > Remote Java Application > New Read More

MySQL Commands Cheatsheet


Install SQL Buddy sudo apt-get install apache2 libapache2-mod-php5 php5-mysql sudo /etc/init.d/apache2 restart Download SQL Buddy, unzip, and move to /var/www Allow connections from a remote server: Set the bind address in /etc/mysql/my.cnf to your ip address Open the port in the firewall by running “/sbin/iptables -A INPUT -i eth0 -p tcp –destination-port 3306 -j ACCEPT” Read More

Creating .asc signature files with GPG


First make sure you don’t have a key already: gpg –list-keys If you didn’t and need to create a key then run: gpg –gen-key It might hang for awhile while generating enough random entropy. Run “ls -R /” to speed things up. And upload it to a public key server: gpg –keyserver hkp://pgp.mit.edu –send-keys <keyid> Read More

Trouble Resuming NX Session


Resume button disabled I was unable to resume my NX session.  While trying to connect, the resume button was greyed out (or grayed out)  This apparently can happen if the two machines are running at a different color depth. The machine I was trying to connect to was running Ubuntu, so I checked the color Read More

Printing a Stack Trace anywhere in Java


You don’t need to catch an Exception in order to print a stack trace in Java.  Sometimes they can be helpful for debugging and logging purposes.  Here’s an example of how to print a stack trace at any moment: new Exception().printStackTrace(); If you want more control over the output, you can build some code off Read More

Determining Port Usage


Want to know how to figure out what’s running on a given port on your machine?  The following example will show you what’s running on port 80 on your Linux machine: lsof -i -n -P | grep :80

Helpful Bash Aliases


Just a few to post for right now, but this entry may grow later. # change to the real directory if in a linked directory alias rd=’cd `pwd -P`’ # search for and open file in sublime function s { FILE=$1; test -f $FILE || FILE=`find . -name $FILE`; sublime $FILE; }

Older Posts