Skip to content

Instantly share code, notes, and snippets.

😌
Working on Conciad

Ryan Sechrest ryansechrest

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 / 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
@ryansechrest
ryansechrest / post-receive-laravel.php
Last active Apr 16, 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 / states.php
Last active May 29, 2018
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',
@ryansechrest
ryansechrest / default.conf
Last active Sep 23, 2015
SSL Certificate Setup in Virtual Host
View default.conf
<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
@ryansechrest
ryansechrest / hello.py
Last active Oct 14, 2017
Create a Python command-line tool.
View hello.py
import click
@click.command()
def cli():
"""Example script."""
click.echo('Hello World!')
@ryansechrest
ryansechrest / programs.md
Last active Aug 29, 2015
Useful programs for CentOS 7.
View programs.md

Programs

firewall-cmd

firewalld command line client

View firewall state
firewall-cmd --state
@ryansechrest
ryansechrest / terminal.xml
Last active Aug 29, 2015
Orange and black Mac terminal theme.
View terminal.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
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NGMSAx
IDEAEAGAAtIQERITWiRjbGFzc25hbWVYJGNsYXNzZXNXTlNDb2xvcqISFFhOU09iamVj
dF8QD05TS2V5ZWRBcmNoaXZlctEXGFRyb290gAEIERojLTI3O0FITltiaWttcn2GjpGa
@ryansechrest
ryansechrest / terminal.md
Last active Oct 7, 2016
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 / commands.md
Last active Aug 29, 2015
Useful commands for CentOS.
View commands.md

Files

Find file

find . -name foobar.txt

-name FooBar — Filter by file name (case sensitive)

@ryansechrest
ryansechrest / configuration-files.md
Last active Oct 7, 2016
RedHat/CentOS configuration files and paths of interest.
View configuration-files.md

Apache

TXT /etc/httpd/conf/httpd.conf — Main Apache server configuration file.

TXT /etc/httpd/conf.d/ssl.conf — Apache server configuration file providing SSL support.

DIR /etc/httpd/vhosts.d/ — Virtual host configuration files.

DIR /var/log/httpd/ — Apache logs.

You can’t perform that action at this time.