Skip to content

Instantly share code, notes, and snippets.

View DrizzlyOwl's full-sized avatar

Ash Davies DrizzlyOwl

View GitHub Profile
@DrizzlyOwl
DrizzlyOwl / apachetop.sh
Created August 31, 2021 11:20 — forked from pgilad/apachetop.sh
Run apachetop on multiple files from find
# Run apachetop on multiple files as a result of find
apachetop $(find /var/log/apache2/ -name "*access.log" -print | sed 's/^/-f '/) -q -l -d 1
# applescript
# add login item
osascript -e 'tell application "System Events" to make login item at end with properties {name: "Notes",path:"/Applications/Notes.app", hidden:false}'
# delete login item
osascript -e 'tell application "System Events" to delete login item "itemname"'
# list loginitems
osascript -e 'tell application "System Events" to get the name of every login item'

Multiple MySQL Versions with Homebrew

For homebrew version 0.9.5.

brew -v # => Homebrew 0.9.5

Install the current version of mysql.

# Install current mysql version

brew install mysql

@DrizzlyOwl
DrizzlyOwl / functions.php
Created September 29, 2016 13:17 — forked from wpscholar/functions.php
Enqueueing IE conditional stylesheets in WordPress the right way
<?php
add_action( 'wp_enqueue_scripts', 'enqueue_my_styles' );
/**
* Example callback function that demonstrates how to properly enqueue conditional stylesheets in WordPress for IE.
* IE10 and up does not support conditional comments in standards mode.
*
* @uses wp_style_add_data() WordPress function to add the conditional data.
* @link https://developer.wordpress.org/reference/functions/wp_style_add_data/
@DrizzlyOwl
DrizzlyOwl / functions.php
Created December 7, 2015 11:46 — forked from anonymous/functions.php
Safely force WordPress to 404
<?php
// safe 404
// Force WordPress to 404 on the current template
// SEO Friendly!
// =================================================
function safe_404(){
global $wp_query;
$wp_query->set_404();
status_header(404);