Why Limit the Format of a Password?

By Josh Sherman
4 min read
development
security
safety

I’ve been moving towards using longer and longer passwords. When I say longer, I mean upwards of over 20 characters, mixed case, numbers and special characters. These longer passwords make me feel a bit more secure, especially when I can also leverage two-factor authentication on top of it. Know what […]

How to Use Colors in Command-line PHP Output

By Josh Sherman
1 min read
development
php
command-line

Nothing spruces up command-line output the way colors do. Just like when you’re customizing your [Bash] prompt, you can use color codes in strings to colorize your output. Keep in mind, these colors will only work on the command-line and not in a browser. First let’s take a look at […]

How to Compare Numeric Variables with PHP

By Josh Sherman
2 min read
development
php

Comparing numeric values is a very common programming task. Which number is greater? is lesser? equal? In PHP like any C-style language, you can do these comparisons with a simple if ( ... ) { ... } statement: if ($var1 > $var2) { echo $var1 . ' is greater than […]

How to check if a variable is an integer with PHP

By Josh Sherman
1 min read
development
php

PHP has a variety of functions and approaches to determine if a variable is a number and/or an integer. The problem is that many of the straight forward approaches can result in false positives depending on how they react to type juggling. Case in point, is_int() will return false for […]

Simplifying Single Server Deployments

By Josh Sherman
6 min read
development
bash
command-line

Last week I discussed the importance of version control for individuals but something I didn’t touch on was how version control systems can be used to simplify and/or automate deployments. I’ve been through the different setups out there, using plain old rsync, leveraging GitHub’s Post-Receive WebHook to call a URL […]