Skip to content

Instantly share code, notes, and snippets.

Avatar
🐅
Tiger Style

Hunter Rancourt skwid138

🐅
Tiger Style
  • Capitol Information Group
  • Minneapolis, Minnesota
View GitHub Profile
View composer-commands.md

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

View editing-dynamics-theme-2017-header.php
<?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
View editing-dynamics-custom.css
/****************
***** 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;
}
View vim_setup.md

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

View vim_commands.md

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)

View php-memory.md

PHP Memory Limit

In PHP Script

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

In WordPress

View notes.md
View go_access.sh
# Run Go Access
# When prompted select the first format,NCSA combined (press space) then hit enter
goaccess -f /var/log/apache2/id.log -c
View useful_shell.sh
# List only directories in the current location
ls -d */
# List files and directories with permissions and dates
ls -lh
# Remove white-sapce (tabs, spaces, and new lines)
sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/ /g' -e 's/[\t ]//g;/^$/d'
View apache_logs.sh
# Apache logs location on Ubuntu
cd /var/log/apache2
# Apache logs location on my local macOS
cd ~/Sites/logs
# Tail Logs, only show rows with specific info (like my ip address)
tail -f /var/log/apache2/[site].log | grep [search term]
# Search through zipped log files for some piece of data (ip/email etc.)