wesley tanaka

Long boring physics lecture #17

()

During dinner, my son asks me why I'm shaking the ice around in my glass.

So I launch into an explanation about how 100 degrees is very very super super duper duper hot, 0 degrees is ice, 25 degrees is something warm, like his ham.

"But my ham is cold."

Okay, maybe your ham is 15 degrees.

And for good measure, one more example is that Ryan is 37 degrees.

"I'm 37???"

Nobody expects a velociraptor for breakfast

()

W> You ready for breakfast?

R> Yes. . . . . . . Velociraptor.

[UPDATE: . . . on the following school day]

W> What do you want for breakfast?

R> Mmmm . . .

W> Cereal with milk?

R> . . .

W> Prunes??

R> . . . . . . . Diplodocus!

Changing Synology default SSH $PATH

By default, my Synology DiskStation NAS gives non-interactive shells a path of:

/usr/bin:/bin:/usr/sbin:/sbin:/usr/syno/bin

/opt/bin is not included so rsync, git and other programs installed with ipkg don't work.

One way to add /opt/bin to the default path to fix git and rsync is:

Progress Bar Project Management

()

To an outsider looking in, commercial software projects* should look like a well designed progress bar.

Dockerfile library

()

I've created some scripts and Dockerfiles to build docker images. There are images for:

Ways to download a file via HTTP from the command line

()

Current Ubuntu distributions do not come with either wget or curl installed, but they do include Python and Perl. Here are some alternative ways to download a file and print it on stdout without wget or curl:

Shaing your home directory between Mac OSX and a VMware Fusion 7 Linux Virtual machine

()

First, give your virtual machine a fixed IP address.  VMWare Fusion's dhcpd server will often change the IP address assigned to your virtual machine -- even while it's still running.  While you can give the entire IP address range block access to your home directory over NFS, that can disrupt some other tools like Vagrant.

% cat /etc/exports
/Users/wtanaka 172.16.221.10 -maproot=root:wheel

Restart nfsd in Mac OS:

% sudo nfsd stop
% sudo nfsd start

Assigning a fixed IP address to a virtual machine in VMware Fusion 7

()

1. Find the dhcpd.conf corresponding to the network that your virtual machine is on.  By default the NAT network uses /Library/Preferences/VMware Fusion/vmnet8/dhcpd.conf. You can find the right one by running ifconfig (or ipconfig in Windows) inside your virtual machine to find its IP address, and look for a range containing that IP address in all of the dhcpd.conf files.

2. Edit the file to add the portions in green.  Be careful not to use a number in the dynamically allocated range, the host computer's IP, or the DNS IP:

Deleting a single URL from Chrome History

()
  1. Go to chrome://history/
  2. Search for the URL in the "Search history" text field
  3. Click and shift click to select all instances
  4. Click "Remove selected items"

Thrift vs Protocol Buffers vs Avro in Python

()

Thrift, Protocol Buffers, and Avro are modern software projects which all contain an IDL-enabled data serialization format with Python support. One might think that because they all have an IDL that they all would enforce some level of type safety even in Python, but one would be wrong:

Syndicate content
by Wesley Tanaka