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 / hello.py
Last active October 14, 2017 15:56
Create a Python command-line tool.
import click
@click.command()
def cli():
"""Example script."""
click.echo('Hello World!')
@ryansechrest
ryansechrest / programs.md
Last active August 29, 2015 14:16
Useful programs for CentOS 7.

Programs

firewall-cmd

firewalld command line client

View firewall state
firewall-cmd --state
@ryansechrest
ryansechrest / terminal.md
Last active October 6, 2022 03:47
Mac Terminal

Editor

Command Description
Control + A Jump to beginning of line
Control + E Jump to end of line
Control + U Delete text before cursor
Control + K Delete text after cursor
Control + W Delete word before cursor
Control + T Swap last two characters before cursor
@ryansechrest
ryansechrest / commands.md
Last active September 12, 2022 14:24
Useful CentOS Commands

Files

Find file

find . -name foobar.txt

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

@ryansechrest
ryansechrest / configuration-files.md
Last active June 4, 2021 21:21
RedHat/CentOS configuration files and paths of interest.

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.

@ryansechrest
ryansechrest / sshd_config
Created March 21, 2014 03:10
Default sshd configuration file.
# $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
@ryansechrest
ryansechrest / httpd.conf
Created March 21, 2014 03:07
Default httpd configuration file.
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
#
# Do NOT simply read the instructions in here without understanding
@ryansechrest
ryansechrest / server.md
Created February 19, 2014 04:44
Base server setup and configuration.
@ryansechrest
ryansechrest / html-style-guide.md
Last active March 14, 2024 20:44
HTML style guide with coding standards and best practices.

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 / .htaccess
Last active September 30, 2022 19:53
Sample configuration files for WordPress as Git submodule.
# 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]