This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: html5-validator | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: HTML5 validator service | |
# Description: HTML5 validator service using validator.nu engine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function log( change ) { | |
// Note that |change.object| is actually a reference to the | |
// target object. | |
if ( change.type === "read" ) { | |
console.log( "What was accessed? ", change.name ); | |
console.log( "What value was given? ", change.oldValue ); | |
} | |
else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace GM; | |
/** | |
* `WP_Query` subclass that takes a non-paginated query and split into different | |
* paginated queries offering a transparent interface to "standard loop" usage. | |
* | |
* The class is not 100% transparent: | |
* - the var `$posts` and the method `get_posts()`, that are not used directly | |
* in standard loop usage, here don't return array of all posts, but only posts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Delete the rewrite_rules of every blog and ping them to recreate the rewrite rules. | |
# | |
# Assumptions: | |
# 1. Your database prefix is wp_ | |
# 2. Your sites are using https:// | |
# 3. The mysql credentials specifed in your .cnf file have the approriate permissions (obviously) | |
# | |
# Usage: ./report-all-blog-themes.sh /path/to/mysql.cnf | |
set -e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function mirco_time_precise_date_time_immutable() | |
{ | |
return DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', microtime(true))); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Pending payment" (pending) = "Zahlung ausstehend" | |
"Processing" (processing) = "In Bearbeitung" | |
"On hold" (on-hold) = "In Wartestellung" | |
"Completed" (completed) = "Abgeschlossen" ("Fertiggestellt" in some places for Swiss German) | |
"Cancelled" (cancelled) = "Storniert/Abgebrochen" | |
"Refunded" (refunded) = "Rückerstattet" | |
"Failed" (failed) = "Fehlgeschlagen" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Update PHP Repo | |
sudo rm /etc/apt/sources.list.d/ondrej-php5-5_6-trusty.list | |
sudo add-apt-repository -y ppa:ondrej/php | |
sudo apt-get -y update | |
# Remove PHP 5.6 | |
sudo apt-get --remove purge -y php5 php5-cli php5-curl php5-gd php5-intl php5-mcrypt php5-memcached php5-mysqlnd php5-readline php5-sqlite php5-cgi php5-common php5-fpm php5-imagick php5-json php5-memcache php5-mongo php5-pgsql php5-redis php-pear | |
sudo apt-get -y autoremove |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bash-Completion script for PHPUnit | |
# | |
# Created by Henrique Moody <henriquemoody@gmail.com> | |
# | |
_phpunit() | |
{ | |
COMPREPLY=() | |
local cur="${COMP_WORDS[COMP_CWORD]}" | |
local prev="${COMP_WORDS[COMP_CWORD-1]}" |
OlderNewer