Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Shhh...

Ryan Sechrest ryansechrest

:octocat:
Shhh...
View GitHub Profile
@ryansechrest
ryansechrest / httpd.conf
Created Mar 21, 2014
Default httpd configuration file.
View httpd.conf
#
# 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 / sshd_config
Created Mar 21, 2014
Default sshd configuration file.
View sshd_config
# $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 / configuration-files.md
Last active Jul 17, 2020
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.

@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 / 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 / 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 / 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 / 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 / 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 / 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',