Skip to content

Instantly share code, notes, and snippets.

View skwid138's full-sized avatar
🐅
Tiger Style

Hunter Rancourt skwid138

🐅
Tiger Style
View GitHub Profile
# Run Go Access
# When prompted select the first format,NCSA combined (press space) then hit enter
goaccess -f /var/log/apache2/id.log -c

PHP Memory Limit

In PHP Script

  • Specified ammount of memeory ini_set('memory_limit','2048M');
  • Unlimited memory ini_set('memory_limit', '-1');

In WordPress

Vim/Vi Commands

Delete an entire line dd (cannot be in Insert mode)

Enter Insert mode to edit the file i

Exit Insert mode esc

Save and Exit Vim :wq (cannot be in Insert mode)

Vim Setup

Vim Package Manager

curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

note: You may be able to skip curling the file as the config should automatically download it for you

/****************
***** FONT ******
***************/
body {
font-family: proxima-nova, Helvetica Neue, Helvetica, Arial, sans-serif !important;
font-size: 1rem !important;
font-weight: 300;
line-height: 1.5;
color: #83ACD8 !important;
}
<?php
/**
* The header for our theme
*
* This is the template that displays all of the <head> section and everything up until <div id="content">
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package WordPress
* @subpackage Twenty_Seventeen

Helpful Composer Commands

Verbose Flag composer update -vvv composer update [package name] -vvv

Update Autoloaded class map

This is helpful if you've changed the file structure. I beleive this also occurs when running composer update

Git Tips

Moved files or directories and git thinks they're deleted and new vs renamed.
The following will resolve most of this assuming the file contents themselves have not changed too much.
git add . -A

Add only previsouly staged or deleted files andd exclude unstaged (new) files
git add -u

Add only a portion of the changes in a file

<?php
/**
* Template Name: Fullpage Slider
* @author: VLThemes
* @version: 1.0.2
*/
get_header();