-
Recent Posts
Recent Comments
Archives
Categories
Meta
Author Archives: PW
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 linux, nano
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 Apt, debian, linux
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 jQuery
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 linux, ps, scripting
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
Crayon Syntax Highlighter (and its studly author)
You may have noticed the syntax highlighter that I use on almost every post (except this one, oddly enough). It’s called Crayon Syntax Highlighter and it’s badassery at it’s finest. I’ve tried a half dozen syntax highlighters for WordPress, but Crayon remains my number one pick.
Story Time!!! When I […] Continue Reading
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 php, web development
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 bash, linux
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 bash, linux
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, nginx