Nerd On Coffee

“docker” Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ SOLUTION

TLDR – Make sure whatever is building your docker image has enough memory. Read on for the amusing story ! Today I was busy building a docker image for work. To start with I was doing it all locally on a pretty powerful laptop. However, I was pipe constrained and each failure would result in re-downloading files, cloning Github repo’s and so on. I have done my best to keep it granular so each expensive download operation was contained within a unique file-system layer (aufs).

Postgres on Docker for a development environment

This is a work-in-progress post that I will finish. I’m putting it up to encourage me to finish it sooner 😛 Terms Host – My laptop. The computer running the docker host Docker Host – a vm running under the host that will in turn run all of the docker containers. Docker Container – a container running under the Docker Host – each Postgres instance or Redis instance.

Batch conversion of media containers using FFMpeg on Windows

This is an old post that I didn’t finish. I’m putting it up out of prosperity I happen to have a lot of MKV files on my NAS. I’d like to stream them around my home without transcoding. Unfortunately the MKV container is not suited to streaming in my environment. I use a mixture of SMB and DLNA streaming. Some of my DLNA clients are pretty abysmal when it comes to container/codec support.

Git – Getting a birds eye view of what branch your repositories are on

This is an old post that I didn’t finish. I’m putting it up out of prosperity A quick script to enable birdseye view of what branch various repositories are residing on. cat #!/bin/bash REPOS=” `find $HOME/somepath* -maxdepth 1 -mindepth 1|xargs -l echo`” GIT_DIRS=${REPOS} for d in $GIT_DIRS do if [ -d $d/.git ]; then cd $d REPO=${d##*/} BRANCH=`git rev-parse –abbrev-ref HEAD` echo $REPO $BRANCH fi done

Check out some new repositories I have pushed to Github!

Hello, I have just pushed up some existing work to Github that I have done. MCL Vehicle Tracker and Logger ASP.Net MVC3 Hospital (University Assignment) Feel free to check them out 🙂 * *Don’t hesitate to teach me something new after you check them out! Happy new year in advance!

Setting up a Magento VM and allowing remote access (Using KVM) for dev purposes (Draft)

This is an old post that I didn’t finish. I’m putting it up out of prosperity 🙂 Rather than use a VPS provider I created a VM locally with the raft of spare computing power and low latency network facilities. This bypassed having to SCP/ Rsync / FTP send resources over the slower internet connection only to run on a constrained magento box. Tools used Arch Linux

Bash Shell tips

Running a command against a selection of files Lets say you want to pull out some data from a few SQL Lite databases. It would be painful to execute your SQL statement against each DB one at a time. Here are two ways to do that assuming you know that each DB is called “some.db”. Using exec [code language=”bash”] find . -name “some.db” -exec sqlite3 {} “SELECT Some_Data from Some_Table” \;

Git Tricks

Here is a collection of Git tips that you may find useful (I did). This list will be updated as I find them (when I remember to as well) Deleting local branches that have already been merged [code language=”bash”] git branch –merged | grep -v “*” | xargs -n 1 git branch -d [/code] Finding particular commits that have certain content e.g I knew at some point in time the repository contained a file (somefile) that started with returning and executing an anonymous JavaScript function that had the signature.

Re-install GRUB on Proxmox

Foreword I have another article on setting up Proxmox and ZFS. Please see it for an introduction. There is currently a bug (in my opinion) where Proxmox always installs GRUB on the MBR of the first active disk. In my case it was the SSD which I in turn, had made the l2ARC for my ZFS pool (which happened to destroy the boot loader). Reinstall Grub Boot into a Linux distribution that is 64 bit (We need the same architecture as Proxmox so we can chroot into it)

Setting up a File Server and Hypervisor using Proxmox and ZFS

About ZFS ZFS is a modern filesystem designed to be extremely flexible, powerful, easy to use and administer. There are already many great articles that go into depth which I will leave you to explore. Please see the References About Proxmox Proxmox is a great set of packages to help you manage your virtual machines. Proxmox simplifies a lot of management for virtual machines and can handle High availability, Clusters and much more.