Skip to content

Instantly share code, notes, and snippets.

View chrisvasey's full-sized avatar
:shipit:
Working from home

Chris Vasey chrisvasey

:shipit:
Working from home
View GitHub Profile
@chrisvasey
chrisvasey / config.json
Created February 7, 2019 18:27
MTMR Config
[
{ "type": "escape", "align": "left" },
{ "type": "exitTouchbar", "width": 44, "align": "left" },
// { "type": "dock", "align": "left" },
// { "type": "brightnessDown", "width": 44, "align": "left" },
// {
// "type": "brightness",
// "width": 60,
// "align": "left",
// "image": {
@chrisvasey
chrisvasey / fix-wordpress-permissions.sh
Created January 28, 2019 15:19 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
<img src="" alt="" id="profileImg">
<script>
$(document).ready(function(){
//Fetch image path
imgPath = $("#welcomepagedivid001" ).load( "/phnx/driver.aspx?routename=Social/UniversalProfile/Bio #____fh_n_ah");
//Add fetched to Prodile image src
$("#profileImg").attr("src",imgPath);
});
</script>
@chrisvasey
chrisvasey / mpm_prefork.conf
Created December 4, 2018 07:55
Default config for mpm_prefork.conf DO WP LAMP Box
<IfModule mpm_prefork_module>
StartServers 3
MinSpareServers 3
MaxSpareServers 5
MaxRequestWorkers 25
MaxConnectionsPerChild 0
</IfModule>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Page Title</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
@chrisvasey
chrisvasey / chocolateyinstall.ps1
Created October 24, 2018 09:57
zhool with choco
$ErrorActionPreference = 'Stop'; # stop on all errors
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$fileLocation = Join-Path $toolsDir '/source/zhool.exe'
$url = ''
$url64 = ''
$packageArgs = @{
packageName = $env:ChocolateyPackageName
<?php
$IP = $_SERVER['REMOTE_ADDR']?:($_SERVER['HTTP_X_FORWARDED_FOR']?:$_SERVER['HTTP_CLIENT_IP']);
?>
@chrisvasey
chrisvasey / showErrors.php
Created October 23, 2018 12:21
Insert to show errors in PHP code when error reporting is turned off in php.ini
<?php
//Print Errors on page
error_reporting(E_ALL);
ini_set('display_errors', 1);
?>
@chrisvasey
chrisvasey / functions.php
Created October 8, 2018 14:35
Adds JS script to login page
function load_login_page_js() {
wp_enqueue_script('login', get_template_directory_uri() . '/assets/js/login-link.js', null, null, true);
}
add_action('login_enqueue_scripts', 'load_login_page_js');
# nginx-wp-common.conf
#
# Contains a common configuration for use by nginx on a WordPress
# installation. This file should be included in any WordPress site
# nginx config with the following line:
#
# include /etc/nginx/nginx-wp-common.conf;
#
# See local-nginx-example.conf-sample for a full example
location / {