Here’s a quick command you can use to find any folders that are over a GB in size on a Linux OS.
sudo du -h / | grep '[0-9\.]\+G'
Here’s a quick command you can use to find any folders that are over a GB in size on a Linux OS.
sudo du -h / | grep '[0-9\.]\+G'
I recently found myself with the need to connect to a Mongo DB instance from a PHP application running on Amazon EC2. The PHP docs led me to this MongoDB extension, which seemed to be a good fit for my needs. Still, the matter of installation was a little bit less clear, considering that the EC2 instance was pretty barebones and lacked a fair number of the “standard” libraries that would enable this single line installation to work.
After a bit of finagling, I got everything to work via the steps I’ve outlined below.
VirtualBox is fantastic open-source software that allows you to operate a virtual machine with another operating system. Though it works on most platforms and can run most operating systems, I have a Mac and I needed a Windows OS to run Microsoft Visual Studio. It took a little while to figure out, but here’s a little tutorial on how to run Windows on a Mac for free. I’ll outline the steps to install VirtualBox, set up a virtual machine to run Windows XP, install some extra features, and enable file sharing between the host machine and the virtual machine.
Sometimes I leave processes running which take up ports on my local machine (e.g., Redis server). I won’t be able to use the port until it’s freed up, but it’s sometimes a chore to figure out how to kill the process by port.
I found the following snippet super useful to kill a process by port in Mac OS:
lsof -t -i tcp:[port] | xargs kill
Just replace the [port] above with the actual numbered port (e.g., 6379).
Changes to my php.ini file kept getting overwritten, until I found where the real file was being loaded from! Here’s how to update php.ini for MAMP PRO.