Laravel queue environment

Ran in to an issue running queue through supervisor. I'll give a quick rundown of my setup, the issue and solution. I have supervisor running the queue daemon. \[program:laravel\_queue\] command=php /var/www/example.com/artisan queue:listen autostart=true autorestart=true stderr\_logfile=/var/log/laraqueue.err …



Docker remove ALL volumes not attached

Docker can be tricky to debug. There's instances where after upgrading a container the volume that was previously attached fails to work. In this case it was a dev image and the quickest, and dirtiest, option was to clear out and rebuild. I could go one by one to delete …



grep without filenames

I needed to grep a directory, and sub directories, and not displaying the filenames in the output. This is when the man page came to the rescue. man grep | grep filename Output -H, --with-filename -h, --no-filename There we go, -h, --no-filename, is what I needed. Example with output to a …



Vagrant error on up

I was executing a vagrant up on my machine. It was giving an nfs error. mount -o 'vers=3,udp' 192.168.10.1:'/opt/<snip>/mozilla/kuma' /home/vagrant/src Stdout from the command: Stderr from the command: stdin: is not a tty mount.nfs: requested NFS …



Head all files in directory

Needed to head all files in a directory. \#!/usr/bin/env bash DEST=/tmp for i in /files/to/head/\* do head -10 "\${i}" > \${DEST}/\$(basename \$i) done



Simple Python Web Scraper

I needed a simple html only scraper. (This doesn't use js, won't pull down data via AJAX). I found an example on another site, thetaranights.com, but it wasn't exactly what I needed. It only pulled the data and printed it to screen. I added a list to loop through …



How to check cp progress after cp has started

First, the easier way to do this is to use rsync in the first place. rsync -avh --progress sourceDirectory destinationDirectory However, sometime you think cp will be quick and you already kicked it off. Here is a quick way to check the progress of a copy command after you've already …



Ubuntu Command line Display Driver Change

Recently upgraded to 15.10 and that looked okay at first. However, the displa driver that it installed, NVIDIA, was causing issues. So I defaulted back to the open source driver and reboot. MISTAKE! Ended up causing the system to crash and couldn't do anything about it. I rebooted into …



Failed to spawn command gulp

I ran in to the error with Atom, Failed to spawn command gulp. The solution for me was to install the module globally. {.lang-js .prettyprint .prettyprinted} $ sudo npm install -g gulp /usr/bin/gulp -> /usr/lib/node_modules/gulp/bin/gulp.js [email protected] /usr/lib/node_modules/gulp ├── interpret …



GIT push from one repo to another

Splitting off from a branch to another git repo seems like it would suck. In reality it's simple. Two lines and you're set. Things you'll need: Source repo pulled down locally Target repo created on your git server (GitHub, BitBucket, GitLab, etc) Url for target git repo Branches \$ cd /path …