Skip to content

Instantly share code, notes, and snippets.

View ryansechrest's full-sized avatar
👨‍💻
Andiamo

Ryan Sechrest ryansechrest

👨‍💻
Andiamo
View GitHub Profile
@ryansechrest
ryansechrest / a.md
Last active November 28, 2022 01:59
WordPress Plugin Skeleton
View a.md

WordPress Plugin Skeleton

This plugin demonstrates how to:

  • Wrap plugin code in PHP class
  • Run code when plugin is activated, deactivated, and uninstalled
  • Register custom post type with labels, menu icon, Gutenberg, and featured thumbnail
  • Add custom admin columns and populate them with data
  • Add new meta box, render custom fields, and save custom field values in database
  • Register new settings, add new section to existing settings page, and sanitize values
@ryansechrest
ryansechrest / phpstorm.md
Last active October 6, 2022 03:45
PhpStorm Commands
View phpstorm.md

Tool Windows

Command Description
+ 1 Project
+ 6 Problems
+ 7 Structure
+ 9 Git

Code

@ryansechrest
ryansechrest / ubuntu.md
Last active May 17, 2023 18:40
Ubuntu Commands
View ubuntu.md

Operating System

Command Description
df -h Disk space utilization by file system
df -i Inode utilization by file system
du -sh * | sort -rn | head Disk space utilization of current folder
hostnamectl See server details
lsb_release -a See Ubuntu version
@ryansechrest
ryansechrest / FleishmanHillard.terminal
Last active August 7, 2022 23:49
FleishmanHillard Terminal Theme
View FleishmanHillard.terminal
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMS
AAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGjCwwTVSRudWxs0w0ODxARElVO
U1JHQlxOU0NvbG9yU3BhY2VWJGNsYXNzTxAnMC4zNjg2Mjc0NTg4IDAuNDE1Njg2MzA5
MyAwLjQ0MzEzNzI4ODEAEAKAAtIUFRYXWiRjbGFzc25hbWVYJGNsYXNzZXNXTlNDb2xv
@ryansechrest
ryansechrest / ssh.md
Last active March 1, 2023 19:19
Create SSH Key
View ssh.md
@ryansechrest
ryansechrest / git.md
Last active October 21, 2022 15:24
Oh My Zsh Git Commands
View git.md
Alias Command Description
ga <file> git add Add file to index
gaa git add --all Add all files to index
gb git branch See all branches
gcm git checkout master Checkout master branch
gcd git checkout develop Checkout develop branch
gco git checkout <branch> Checkout specified branch
gcb git checkout -b <branch> Create specified branch
gc git commit --verbose Commit and review changes
@ryansechrest
ryansechrest / twitch.css
Last active September 12, 2022 14:22
LimeChat Theme
View twitch.css
/**
* Blue: #4b92db
* Light Grey: #8e908f
* Light Blue: #aacae6
* Dark Grey: #5e6a71
* Dark Blue: #165788
* Orange: #eeaf00
* Red: #dc5034
* Green: #a2ad00
* Aqua: #00c6d7
@ryansechrest
ryansechrest / post-receive-laravel.php
Last active November 14, 2019 15:28
Git post-receive hook to deploy a Laravel application.
View post-receive-laravel.php
#!/bin/bash
# Created on 7/17/13 by Ryan Sechrest
# Deploys pushed branch from the origin repository to the web directory
if [[ (-n $1) && (-n $2) && (-n $3) ]]; then
# Set path to project directory
project_path="/var/www/domains/$2/$3"
@ryansechrest
ryansechrest / states.php
Last active November 15, 2022 20:23
PHP Arrays of U.S. States
View states.php
# State Abbr => State Name; Vertical Format
[
'AL' => 'Alabama',
'AK' => 'Alaska',
'AZ' => 'Arizona',
'AR' => 'Arkansas',
'CA' => 'California',
'CO' => 'Colorado',
'CT' => 'Connecticut',