Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
<?php | |
/* | |
Plugin Name: Fix SSL Please | |
Plugin URI: https://github.com/kasparsd/ssl-fix | |
GitHub URI: https://github.com/kasparsd/ssl-fix | |
Description: Ensure that everything works over SSL | |
Version: 0.1.1 | |
Author: Kaspars Dambis | |
Author URI: http://kaspars.net | |
*/ |
<?php | |
/** | |
* Plugin Name: Admin PWA | |
*/ | |
namespace Preseto\Admin_PWA; | |
const ACTION_QUERY_VAR = 'admin-pwa'; | |
function manifest_url() { |
<?php // Run as `php zip-chunks.php path/to/directory`. | |
$chunk_limit = 1024 * 1024 * 1024; // 1 GB | |
function get_files( $path ) { | |
$files = glob( rtrim( $path, '\\/' ) . '/*' ); | |
foreach ( $files as $file ) { | |
if ( is_dir( $file ) ) { | |
$files = array_merge( $files, get_files( $file ) ); | |
} |
#!/bin/bash | |
mkdir -p popular | |
while read repo; | |
do | |
[ -d "popular/$repo" ] || svn export "https://plugins.svn.wordpress.org/$repo/trunk" "popular/$repo" | |
done <popular-plugins.txt |
<?php | |
// Remove the wp_title filter | |
add_action( 'init', 'remove_wpseo_title_rewrite' ); | |
function maybe_remove_wpseo_title_rewrite() { | |
global $wpseo_front; | |
remove_filter( 'wp_title', array( $wpseo_front, 'title' ), 15 ); | |
} |
<!doctype html> | |
<html ng-app="timezoneApp"> | |
<head> | |
<title>Team Timezones</title> | |
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js"></script> | |
<script> | |
var period = 172800; // 2 days in seconds | |
var now = new Date(); | |
var utc = new Date( now.getTime() + now.getTimezoneOffset() * 60000 ); | |
var seconds_today = utc.getSeconds() + ( 60 * ( utc.getMinutes() + ( 60 * utc.getHours() ) ) ); |
<?php | |
// Author: Kaspars Dambis <hi@kaspars.net> | |
// Usage: php ms-cron-runner.php --domain=example.com [--path=/path/to/wordpress] | |
// We can't run this reliably from CLI because of how WordPress | |
// relies on $_SERVER for loading functions.php | |
if ( php_sapi_name() !== 'cli' ) | |
die; |
<?php | |
/* | |
Term Archive Pages: | |
- http://example.com/recipes/dinner/ | |
- http://example.com/recipes/breakfast,brunch/ | |
Single Recipe Pages: | |
- http://example.com/recipes/dinner/soup-title/ |
<?xml version="1.0" encoding="UTF-8" ?> | |
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:soapenc="http://www.w3.org/2003/05/soap-encoding" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" | |
xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" | |
xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" | |
xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" | |
xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl" xmlns:tst="http://www.onvif.org/ver10/storage/wsdl" | |
xmlns:ter="http://www.onvif.org/ver10/error" xmlns:dn="http://www.onvif.org/ver10/network/wsdl" | |
xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" | |
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl" xmlns:wsoap12="http://schemas.xmlsoap.org/wsdl/soap12" |