Skip to content

Instantly share code, notes, and snippets.

View A5hleyRich's full-sized avatar

Ashley Rich A5hleyRich

View GitHub Profile
import http from 'k6/http';
import { sleep } from 'k6';
export const options = {
insecureSkipTLSVerify: true,
};
export default function() {
http.get('https://uat.fathomevents.com/',
{
@A5hleyRich
A5hleyRich / index.html
Created October 23, 2018 11:41
Sample back soon page.
<!doctype html>
<html>
<head>
<title>Back Soon</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { background-color: #e13067; font: 20px Helvetica, sans-serif; color: #fff; line-height: 1.5 }
article { display: block; width: 650px; margin: 0 auto; }
</style>
$post_content_sql = "UPDATE $wpdb->posts SET `post_content` = replace(post_content, '{$pair['old_url']}', '{$pair['new_url']}'){$where_sql};";
$meta_content_sql = "UPDATE $wpdb->postmeta SET `meta_value` = replace(meta_value, '{$pair['old_url']}', '{$pair['new_url']}') WHERE `meta_key` IN ('tve_content_before_more', 'tve_save_post', 'tve_updated_post');";
// run the sql
$wpdb->query( $post_content_sql );
$wpdb->query( $meta_content_sql );
Verifying that +a5hleyrich is my blockchain ID. https://onename.com/a5hleyrich
@A5hleyRich
A5hleyRich / ashleyrich.com
Last active February 15, 2017 15:10
Hosting WordPress Yourself Part 7
fastcgi_cache_path /home/ashley/ashleyrich.com/cache levels=1:2 keys_zone=ashleyrich.com:100m inactive=60m;
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name pluto.ashleyrich.com;
ssl_certificate /etc/letsencrypt/live/pluto.ashleyrich.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/pluto.ashleyrich.com/privkey.pem;
@A5hleyRich
A5hleyRich / add.php
Last active September 11, 2015 19:29
Delightful Downloads Custom Outputs
<?php
function dedo_custom_output( $styles ) {
$styles['icon_link'] = array(
'name' => __( 'Icon Link', 'delightful-downloads' ),
'format' => '<div class="download_container"><i class="fa fa-download"></i><a href="%url%" title="%title%" rel="nofollow">%title%</a></div>'
);
return $styles;
}
@A5hleyRich
A5hleyRich / add.php
Last active September 11, 2015 19:23
Delightful Downloads Custom Buttons
<?php
function dedo_custom_button( $buttons ) {
$buttons['custom'] = array(
'name' => __( 'Custom Button', 'delightful-downloads' ),
'class' => 'button-custom'
);
return $buttons;
}
@A5hleyRich
A5hleyRich / add.php
Last active September 11, 2015 19:35
Delightful Downloads Custom Lists
<?php
function custom_list( $lists ) {
$lists['icon_date'] = array(
'name' => 'Icon (Date)',
'format' => '<i class="fa fa-download"></i><a href="%url%" title="%title%" rel="nofollow">%title% - %date%</a>'
);
return $lists;
}
@A5hleyRich
A5hleyRich / nginx.conf
Last active February 16, 2017 11:51
Hosting WordPress Yourself Part 6
user ashley;
worker_processes 1;
pid /run/nginx.pid;
events {
worker_connections 1024;
multi_accept on;
use epoll;
}
@A5hleyRich
A5hleyRich / backup.sh
Last active July 4, 2016 15:17
Simple WordPress Backups
#!/bin/bash
cd /home/ashley/ashleyrich.com/public
# Backup database
wp db export ../backups/`date +%Y%m%d`_database.sql --add-drop-table
# Backup uploads directory
tar -zcf ../backups/`date +%Y%m%d`_uploads.tar.gz wp-content/uploads