from this question on Stack Overflow
Set up a managed_files
variable as an array
- hosts: whatever
vars:
managed_files:
- file1
- file2
*CapsLock:: | |
Send {Blind}{Ctrl Down} | |
cDown := A_TickCount | |
Return | |
*CapsLock up:: | |
If ((A_TickCount-cDown)<400) ; Modify press time as needed (milliseconds) | |
Send {Blind}{Ctrl Up}{Esc} | |
Else | |
Send {Blind}{Ctrl Up} |
#!/usr/bin/env bash | |
# Helper script to help migrate Composer (https://getcomposer.org/) | |
# global scripts to being managed by CGR (https://github.com/consolidation/cgr) | |
# | |
# Copyright (c) 2017 Scott Lesovic | |
# Released under the MIT License | |
# Sanity check Composer | |
which composer |
<?php | |
//* Do NOT include the opening php tag | |
//* Add JS to allow elements to be faux anchors | |
add_action( 'wp_footer', 'bg_script_clickable' ); | |
function bg_script_clickable() { | |
echo '<script type="text/javascript">jQuery(document).ready(function($){$(".content .entry").click(function(){window.open($("a",this).attr("href"), "_blank");});});</script>'; | |
} |
#!/bin/bash | |
# Find all boxes which have updates | |
AVAILABLE_UPDATES=`vagrant box outdated --global | grep outdated | tr -d "*'" | cut -d ' ' -f 2` | |
if [ ! ${#AVAILABLE_UPDATES[@]} -eq 0 ]; then | |
for box in $AVAILABLE_UPDATES ; do | |
echo "Found an update for $box" |
from this question on Stack Overflow
Set up a managed_files
variable as an array
- hosts: whatever
vars:
managed_files:
- file1
- file2
add_filter( 'author_link', 'prefix_adjust_author_link', 10, 3 ); | |
function prefix_adjust_author_link( $link, $author_id, $author_nicename ) { | |
$author_id = intval( $author_id ); // Sanitize | |
$user_info = get_userdata( $author_id ); | |
if ( ! $user_info ) { | |
return $link; | |
} | |
$link = home_url( '/' ) . 'who/' . $user_info->user_login; |
LOGNAME=$(logname) | |
UUSER=$([ "${LOGNAME}" = "${USER}" ] && echo ${USER} || echo '$(tput setaf 1)${LOGNAME}$(tput sgr0) as ${USER}') | |
PS1="[${UUSER}@\h \W]\\$ " |
I drop this in WPMU_PLUGIN_DIR
when developing.
WPMU_PLUGIN_DIR
defaults to wp-content/mu-plugins/
but is configurable in wp-config.php
sudo apt-get remove --purge $(dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d') |
<?php | |
/** | |
* There are layers of protection to check a few things | |
* - Only run this code once | |
* - Only run when accessed by Google, MSN, or Yahoo! | |
* | |
* I removed those checks to make this more readable | |
*/ |