Skip to content

Instantly share code, notes, and snippets.

View Drethic's full-sized avatar

Drethic

  • Harpers Ferry, WV
View GitHub Profile
@Drethic
Drethic / gist:cf30dda98dedfb8b265ed16849bd1b7c
Created October 8, 2019 13:53
PHP site.conf httpd config
# With www forced redirect
<VirtualHost *:80>
ServerName http://www.example.com
RewriteEngine On
RewriteCond %{HTTP_HOST} !^(www)\.(example.com)$ [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
DocumentRoot /var/www/examplecom
ErrorLog /var/log/httpd/examplecom_error.log
<Directory "/var/www/examplecom">
AllowOverride All
@Drethic
Drethic / proxy.conf
Created October 9, 2016 20:20
Proxy file to allow Jira, Confluence, and Bitbucket to be run on the same server and all served on port 80
upstream jira {
server 127.0.0.1:8080;
}
upstream confluence {
server 127.0.0.1:8585;
}
upstream bitbucket {
server 127.0.0.1:9090;
@Drethic
Drethic / raw-to-planet-map.json
Created July 31, 2016 16:39
EVE Online Raw Planetary Interaction (PI) Material (P0/R0) to Planet Map
[{
"typeID": 2073,
"planets": [
2016,
12,
2014,
11
]
}, {
"typeID": 2267,
@echo off
setlocal enableextensions enabledelayedexpansion
set pwd=%~dp0
:: Check if folder exists
if exist "C:\Program Files\7-Zip\7z.exe" (
echo."7z.exe was found in C:\Program Files\7-Zip\"
set zip="C:\Program Files\7-Zip"
) else if exist "C:\Program Files (x86)\7-Zip\7z.exe" (
echo."7z.exe was found in C:\Program Files (x86)\7-Zip\"
set zip="C:\Program Files (x86)\7-Zip"
@Drethic
Drethic / admin.js
Last active June 6, 2016 03:15
Basic example of how to use the jQuery Validate library to display errors on the admin side of WordPress in conjunction with jaredatch / Custom-Metaboxes-and-Fields-for-WordPress.
jQuery(document).ready(function($) {
$('.cmb_id__prefix_layout_option').find('td').append('<div id="_prefix_layout_option_error" class="alert alert-error text-center"></div>');
$('input[name="_prefix_layout_option"').addClass('layout_option');
$('.cmb_id__prefix_thank_you_url').find('td').append('<div id="_prefix_thank_you_url_error" class="alert alert-error text-center"></div>');
$('input[name="_prefix_thank_you_url"').addClass('thank_you_url');
$("#post").validate({
//debug: true,
ignore: [],
wrapper: 'p',