Category Archives: Googling for Answers

Stop Nano from adding newline character to end-of-file

I use Nano for all of my cli text file editing and I had always noticed that it puts a newline at the bottom of the file, but this has never bothered me much. Well today it caused me quite a headache at work, so I had to figure out […] Continue Reading

Posted in Googling for Answers, Linux Tagged ,

Debian: show a list of all packages that are to be upgraded with apt

This is a super easy one, and can easily be found in the man page, but I’ve googled it enough times that I think it’s worth including here. To see packages with available upgrades, without installing them, use the -u option: apt-get upgrade -u […] Continue Reading

Posted in Googling for Answers, Linux Tagged , ,

jQuery: Execute a callback once, after a class based animation completes

I was developing some web recently and ran into a jQuery problem that was new to me. I was using a class selector to fade a group of elements, and using a callback function which would fire after the fade was complete. Something like this:

[note color=#DDD] $('.myclass').fadeOut('fast', function() { […] Continue Reading
Posted in Googling for Answers, Web Development Tagged

Stop truncating your output you jerk!

The jerk in this scenario is the linux command ‘ps’. I was using it recently in a script that checks to make sure a certain process is running. Whenever I would run the command directly, I would get the desired response, a 1, indicating that the process was found. However, […] Continue Reading

Posted in Googling for Answers, Linux Tagged , ,

LEMP Site Setup Script, including SFTP

Setting up a LEMP server on Debian 6 was the first post I ever wrote. The impetus for that post (and this blog) was to chronicle all the steps I took, so that I could go back later and find my answers here, instead of googling them up all over […] Continue Reading

Posted in Googling for Answers, Linux, Nginx Tagged , , , , ,

Display All Errors and Warnings in PHP

I find myself googling this up waaaaaaay too often, but there’s nothing unusual about that. I usually put this at the top of my code during development.

[note color=”#DDD”] PHP error_reporting(E_ALL); ini_set('display_errors', '1'); 12 error_reporting(E_ALL);ini_set('display_errors', '1'); [/note]

Here’s another handy […] Continue Reading

Posted in Googling for Answers, Web Development Tagged ,

Colored Output for ls as root

I feel like a total nubbins for this one. I’ve been messing around with linux for many years now and I’ve always wondered why my regular users had pretty color coded files and directories when using ls, but root never did. It always bothered me, and I knew there was […] Continue Reading

Posted in Googling for Answers, Linux Tagged ,

Linux Command Line Aliases

Ok, you have to promise not to make fun of me if you’re going to continue reading. You promise? Pinky swear?

Alright then, here we go. Somehow or another, I managed to avoid knowledge of command aliases in Linux for over 13 years! I’m gonna give you a moment to […] Continue Reading

Posted in Googling for Answers, Linux Tagged ,

Nginx: 502 Bad Gateway

I just recently switched from Apache to Nginx and everything seemed to be going well. However, while testing a PunBB site that I brought over, I got a 502 Bad Gateway error when trying to make a post. The strange thing was, the behavior was inconsistent. I could post in […] Continue Reading

Posted in Googling for Answers, Linux, Nginx Tagged ,

Linux Find and Replace with sed

Have you ever found yourself googling how to find and replace within a file from the linux command line? Me too. Here’s the answer that works for me: sed -i 's/search/replace/g' /path/to/file.txt

Rather than type that command all the time, I wrote […] Continue Reading

Posted in Googling for Answers, Linux Tagged