To start your first git project, follow these steps: Create a new directory on your computer to hold the project files. Open a terminal window
How to Insert Multiple Rows with MySQL (insert shortcut)
Below is an example how to insert multiple values/rows into a table using a single insert statement shortcut. Versus individually listing out each insert statement
Get the PHP Version at Command Line (3 examples)
To find the PHP version you can combine php and grep. Get the major/minor version only 7.2 Get full version number only 7.2.10 Get the
Function to Calculate the Best Font Color for a Background Color
This PHP function tables a hexadecimal color code like “ff0000” and figures out what’s more color font text would be more readable, black or white.
Open Source Fast Sentiment Analysis (NLP) in Python
The Python Sentiment API Project will allow you to implement Natural Language Processing sentiment analysis in any programming language. That is, passing a piece of
Explode String by Any Whitespace
This one-liner function will turn a string into an array by its whitespace properly looking for full-width spaces and multi-byte whitespace characters.
while/foreach/for loop Skip to Next Iteration
If you need to skip to the next item inside of a PHP loop its simple with the continue; control keyword. You can also use
Perl Script to Get CPU Percent Used
Found this old perl script in my scratch scripts to get the current CPU load on Linux. Perls been replaced with Python for most of
Replace Everything Inside Two Strings
Using the built in PHP regex function preg_replace and property encoding the two strings you’re searching for with preg_quote you can remove all of the
Strip Image EXIF Data
Many times you’ll want to remove the meta data on user uploaded images to your website. The meta data automatically saved to the images can