Count IP Occurrences in Apache / Nginx Logs

This command will parse an Apache or Nginx log file and print-out the 50 highest occurring IP’s, along with the number of occurrences, to the shell prompt. machine:~ User$ cat access.log | awk ‘{print $1}’ | sort -n | uniq -c | sort -nr | head -50 cat – reads the file access.log – is… Continue reading Count IP Occurrences in Apache / Nginx Logs

Bootstrap v4, hidden-*, visible-* replacements

Bootstrap v4 has replaced the following classes: hidden-sm-down, hidden-md-down, hidden-lg-down, hidden-xl-down, hidden-xs-up, hidden-sm-up, hidden-md-up, hidden-lg-up, hidden-xl-up, hidden-xs, hidden-sm, hidden-md, hidden-lg, hidden-xl, visible-xs, visible-sm, visible-md, visible-lg, visible-xl Below is an example of what classes you now need to have in order to reproduce the same effect as the above removed classes. There is also an extension… Continue reading Bootstrap v4, hidden-*, visible-* replacements

Published
Categorized as Graphics, Web

GIT Using SSH to Push Remote to Server

On the server terminal, type: git remote add origin ssh://user@domain.com:22/home/user/remote.git The name of your remote repo will be ‘origin’. ‘user’ is your user name, ‘domian.com’ is your domain or IP address. ‘:22’ is the port number used to connect to your ssh server. ‘/home/user/remote.git’ is the location of your remote git repo. Before you push… Continue reading GIT Using SSH to Push Remote to Server

Quickly Testing TTFB (Time To First Byte) with Apache Benchmarking Tool

Checking the cause of a high TTFB (Time To First Byte) can be time consuming. And pinpointing the issue requires multiple tests against even the smallest changes. Enter Apache’s Benchmarking Tool ab to help with quick testing. ab -n 100 http://www.website.com/ The above command will execute 100 tests against the website entered. The results are… Continue reading Quickly Testing TTFB (Time To First Byte) with Apache Benchmarking Tool

Pushing Large Git Repository

Pushing a large Git Repository can cause issues; time-outs, disconnects or general freezing tend to happen with especially large Git Repos. The best way to handle pushing those large git repos is to break the pushes down into commit chunks. Using git log you can decide how far back and how many chunks you would… Continue reading Pushing Large Git Repository

OpenX – PHP 5.4.34 Upgrade Error Fix

If your OpenX installation is printing-out the following: Strict Standards: Non-static method PEAR::setErrorHandling() should not be called statically in /home/user/directory/lib/Max.php on line 222 Strict Standards: Non-static method OA::debug() should not be called statically, assuming $this from incompatible context in /home/user/directory/lib/max/ErrorHandler.php on line 134 Strict Standards: Non-static method Log::singleton() should not be called statically, assuming $this… Continue reading OpenX – PHP 5.4.34 Upgrade Error Fix

Prevent Ampersand Issues in Javascript on WordPress Pages & Posts

Ampersands in WordPress Posts and Pages are always encoded into either their numeric (&) or name (&) html entity. This can become troublesome if you are including javascript into the page or post. Using the ampersand’s unicode code point value (0026) is the best way around this issue. So writing ampersand would be done by… Continue reading Prevent Ampersand Issues in Javascript on WordPress Pages & Posts

Quickly Run A HTTP Server From Any Directory

Python makes it easy to run a simple http server from any directory on your system. From command line execute the following command from the directory you would like the server to run from: $ python -m SimpleHTTPServer 8080 A simple http server will be running with the root being whatever directory you executed the… Continue reading Quickly Run A HTTP Server From Any Directory

Debug and Inspect Webpages on AVD (Android Emulator) Browsers

There is a lot of documentation on the web on ways to debug websites for Android using their AVD (Android Virtual Device/Emulator). But I thought to make a simple step-by-step instruction to get a web debugger up and running for an AVD. Weinre is the debugger that I use. You can download weinre build from… Continue reading Debug and Inspect Webpages on AVD (Android Emulator) Browsers