Sunday, July 26, 2015

New Macbook Pro Setup

I'm finally switching to a Macbook Pro as my personal computer after a few months of using one at work. Local development on OSX is a lot easier and bug-free than on a Windows computer.

These gists were really helpful in getting everything set up:
https://gist.github.com/mbinna/2357277 (OSX For Hackers)
https://gist.github.com/saetia/1623487 (Clean Install – OS X 10.11 El Capitan Developer Preview 2)
http://docs.hardentheworld.org/OS/OSX_10.10_Yosemite/ (hardening guidelines)

Bluetooth was enabled by default. It's a good idea to turn that off if you're not using it.

Also installed iterm2 and made skip word with alt work: http://www.hackaddict.net/2007/07/skip-to-next-or-previous-word-in-iterm.html

Saturday, July 11, 2015

In Order to Configure TCP/IP, You Must Install and Enable a Network Adapter Card

If you get this error message, you need to disable and uninstall your network adapter. Once you've done that, you can reinstall the driver to fix it.

Cygwin - Python Compiled Without SSL Support

Download error on https://pypi.python.org/simple/pip/: unknown url type:
https -- Some packages may not be found!

ImportError: cannot import name HTTPSHandler

I was trying to install pip in cygwin when this happened. Searches say openssl-devel needed to be installed, but it already was. Apparently python was compiled without ssl support.

My solution was to install cygwin-x86 instead of the 64x one.

Friday, July 10, 2015

md5sum: standard input: no properly formatted MD5 checksum lines found

If you see this error when you're using apt-cyg, it means you need to update apt-cyg.

You need to run the following commands:

lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg
install apt-cyg /bin

Saturday, June 27, 2015

Automatically Remove Long-Running Docker Containers

The following can be used in cron or run with & at the end of the command:


I found this didn't work: http://www.ahtik.com/blog/removing-detached-docker-containers-automatically/

Tuesday, June 2, 2015

Docker Run In Crontab

"0 5 * * 1 docker run --rm --name=mycontainer ubuntu:13.10 /opt/bin/job"
The above command is an example of how "docker run" would be used in crontab to run once every week at 5am.

  • --rm will delete the container once the job is finished running
  • --name will name the container and prevent duplicate jobs from running
  • You don't need to use "&" at the end, because crons already run in the background.

Friday, May 8, 2015

MySQL Batch Updates Not Working

Looking at "SHOW PROCESSLIST" and it looks like your queries are running individually instead of in batches like you sent?

This happens because MySQL runs each update statement individually, but you should still be able to see the batches when the queries are in the "init" state.

Use this query to see the batched queries:
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST where state="init";