Skip to content

Instantly share code, notes, and snippets.

@trepmal
trepmal / find-new-files.sh
Created January 6, 2015 21:18
regularly look for newly modified files, notify hipchat room on discovery
#!/bin/sh
#
# ./find-new-files [path(.)] [minutes(360)]
#
if [ -z $1 ]
then
dir='.'
else
dir=$1
@danielbachhuber
danielbachhuber / gist:6719651
Created September 26, 2013 19:54
Automatically append mtime to script and style versions for cache-busting action
<?php
/** Automatically append mtime to script and style versions for cache-busting action **/
add_action( 'wp_enqueue_scripts', function() {
global $wp_styles, $wp_scripts;
foreach( array( 'wp_styles', 'wp_scripts' ) as $resource ) {
foreach( $$resource->registered as $name => $registered_resource ) {
// Not hosted here
<?php
class CWS_Jetpack_Modules {
function __construct() {
add_filter( 'option_jetpack_active_modules', array( $this, 'active_modules' ) );
}
function active_modules( $modules ) {
$allowed_modules = array(
'enhanced-distribution',
@markjaquith
markjaquith / plugin-deploy.sh
Created November 16, 2012 05:04 — forked from scribu/plugin-deploy.sh
Plugin deploy script
#!/bin/bash
# args
MSG=${1-'deploy from git'}
BRANCH=${2-'trunk'}
# paths
SRC_DIR=$(git rev-parse --show-toplevel)
DIR_NAME=$(basename $SRC_DIR)
DEST_DIR=~/svn/wp-plugins/$DIR_NAME/$BRANCH
@aaronjorbin
aaronjorbin / expectations.md
Created October 25, 2012 21:32
Expectations for speakers and organizers of WordCamps

Purpose

The purpose of this document is to start a discussion that leads to better expectations between speakers and organizers of WordCamps. It is based on Open Conference Expectations by @rmurphey @divya and @paul_irish. It is based on my experience speaking at many WordCamps and seeing some great things and not great things. I would love your comments and feedback.

What I ask for as a speaker

  1. A complimentary ticket to the event.
  2. A code of conduct for every attendee, including speakers and sponsors. Everyone should be able to have a good time in a safe, harassment-free environment. See the The Ada Initiative for more information on how to create such a policy.
  3. Adequate amount of time to prepare. This means the call for speakers should occur at least sixty days before the camp and invitations at least thirty days before the
@norcross
norcross / pre-debug.php
Last active October 3, 2015 05:37
Wrap print_r in a 'pre' tag
<?php
function preprint($s, $return = false) {
$code = '<pre>';
$code .= print_r($s, 1);
$code .= '</pre>';
if ($return)
return $code;
else
print $code;
}
@splorp
splorp / comment-blacklist-for-wordpress.md
Last active November 26, 2023 08:47
Comment Blacklist Keywords for WordPress

Comment Blacklist for WordPress

Notice!

As of November 5th, 2013, this version of the blacklist will no longer be updated.

I have migrated the project to a full Git repository in order to better track changes, bugs, and feedback.

Check out Comment Blacklist for WordPress on GitHub.

@xentek
xentek / generate_update.sh
Created November 19, 2011 21:34
Generate the necessary sql statements to move a WordPress site from one environment to another
#!/usr/bin/env bash
echo "@@@ @@@ @@@@@@@@ @@@ @@@ @@@@@@@ @@@@@@@@ @@@ @@@ "
echo "@@@ @@@ @@@@@@@@ @@@@ @@@ @@@@@@@ @@@@@@@@ @@@ @@@ "
echo "@@! !@@ @@! @@!@!@@@ @@! @@! @@! !@@ "
echo "!@! @!! !@! !@!!@!@! !@! !@! !@! @!! "
echo " !@@!@! @!!!:! @!@ !!@! @!! @!!!:! @!@@!@! "
echo " @!!! !!!!!: !@! !!! !!! !!!!!: !!@!!! "
echo " !: :!! !!: !!: !!! !!: !!: !!: :!! "
echo ":!: !:! :!: :!: !:! :!: :!: :!: !:! "
@ocean90
ocean90 / box-shadow.html
Last active April 11, 2024 13:54
CSS3 Box Shadow, only top/right/bottom/left and all
<!DOCTYPE html>
<html>
<head>
<title>Box Shadow</title>
<style>
.box {
height: 150px;
width: 300px;
margin: 20px;
@mxcl
mxcl / uninstall_homebrew.sh
Created August 26, 2011 11:25
Uninstall Homebrew
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e