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

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

Tool Windows

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

Code

@ryansechrest
ryansechrest / FleishmanHillard.terminal
Last active August 7, 2022 23:49
FleishmanHillard Terminal Theme
<?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 / a.md
Last active January 23, 2024 06:20
Tech Interview & Resume Tips
@ryansechrest
ryansechrest / ssh.md
Last active March 1, 2023 19:19
Create SSH Key

Create SSH Key

1a. Use ed25519 algorithm

ssh-keygen -t ed25519 -C "your_email@example.com"
  • -t Specifies the type of key to create.
  • -C Provides a new comment.
@ryansechrest
ryansechrest / git.md
Last active October 21, 2022 15:24
Oh My Zsh Git Commands
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
/**
* 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.
#!/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
# State Abbr => State Name; Vertical Format
[
'AL' => 'Alabama',
'AK' => 'Alaska',
'AZ' => 'Arizona',
'AR' => 'Arkansas',
'CA' => 'California',
'CO' => 'Colorado',
'CT' => 'Connecticut',
@ryansechrest
ryansechrest / default.conf
Last active September 12, 2022 14:23
SSL Certificate Setup in Virtual Host
<IfModule mod_ssl.c>
<VirtualHost *:443>
Include vhosts.d/includes/domain.com.conf
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SetEnvIf User-Agent ".*MSIE.*" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0
SSLCertificateChainFile /var/www/ssl/certificate-authority-default.crt
SSLCertificateFile /var/www/ssl/star.domain.com.crt
SSLCertificateKeyFile /var/www/ssl/star.domain.com.key