Skip to content

Instantly share code, notes, and snippets.

:octocat:
Shhh...

Ryan Sechrest ryansechrest

:octocat:
Shhh...
Block or report user

Report or block ryansechrest

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ryansechrest
ryansechrest / html-style-guide.md
Last active Jun 3, 2020
HTML style guide with coding standards and best practices.
View html-style-guide.md

HTML Style Guide

All rules and guidelines in this document apply to HTML files.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Icon Legend:

· Space, Tab, Enter/Return

@ryansechrest
ryansechrest / php-style-guide.md
Last active May 26, 2020
PHP style guide with coding standards and best practices.
View php-style-guide.md

PHP Style Guide

All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts
@ryansechrest
ryansechrest / terminal.md
Last active Apr 20, 2020
Shortcuts for Mac terminal.
View terminal.md

Shortcuts

Command Description
Ctrl + A Jump to beginning of line
Ctrl + E Jump to end of line
Ctrl + U Delete text before cursor
Ctrl + K Delete text after cursor
Ctrl + W Delete word before cursor
Ctrl + T Swap last two characters before cursor
@ryansechrest
ryansechrest / .htaccess
Last active Apr 20, 2020
Sample configuration files for WordPress as Git submodule.
View .htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Prevent requests to index.php from being rewritten
RewriteRule ^index\.php$ - [L]
# Prefix specified PHP files with 'wordpress'
RewriteRule ^((wp-login|xmlrpc)\.php) wordpress/$1 [R=301,L]
@ryansechrest
ryansechrest / bash-commands.sh
Last active Apr 20, 2020
New and enhanced bash commands for developers on Mac OS X.
View bash-commands.sh
#!/bin/bash
# ---------------------------------------------------------------------------
#
# File: .bash_commands
#
# Author: Ryan Sechrest
# Website: ryansechrest.com
#
# Description: New and enhanced bash commands for developers on Mac OS X.
@ryansechrest
ryansechrest / post-receive-laravel.php
Last active Nov 14, 2019
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 / FleishmanHillard.xml
Last active Nov 2, 2019
FleishmanHillard terminal themes.
View FleishmanHillard.xml
<?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>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw
LjM2ODYyNzQ1ODggMC40MTU2ODYzMDkzIDAuNDQzMTM3Mjg4MQAQAoAC0hAREhNaJGNs
YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp
@ryansechrest
ryansechrest / server-to-localhost.sh
Created Dec 23, 2013
Bash script to synchronize website directory and database between server and localhost or server and server.
View server-to-localhost.sh
#!/bin/bash
# Created on 10/8/13 by Ryan Sechrest
# site (localhost edition)
# Program to mirror a directory and database of a website between two servers.
### Program meta data
@ryansechrest
ryansechrest / vagrant.md
Last active Jan 27, 2019
Various cheat sheets for systems like Vagrant, Puppet, MySQL, etc.
View vagrant.md

Initialize

vagrant init [box-name] [box-url] — Add box and initialize VM

CentOS 6.5 box with Puppet:

vagrant init centos65p http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-puppet.box

CentOS 6.5 box without Puppet:

vagrant init centos65 https://github.com/2creatives/vagrant-centos/releases/download/v6.5.3/centos65-x86_64-20140116.box

@ryansechrest
ryansechrest / twitch.css
Last active Nov 16, 2018
LimeChat theme using grid.
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
You can’t perform that action at this time.