I tested the following script on a vagrant box.
The box was 850MB without the script, and 450 MB with the script.
The script was taken from chef/bento with just one modification.
<?php | |
$pagination = paginate_links( array( | |
'base' => get_pretty_url($currentMarket, $currentCategory) . '%_%', | |
'format' => '/page/%#%', | |
'current' => $paged, | |
'total' => $posts->pagination()->total, | |
'prev_next' => false | |
)); | |
function get_pretty_url( $root, $marketSlug, $topicSlug ) { |
<?php | |
add_action( 'init', function () { | |
add_rewrite_rule('blog/market/([^/]+)/category/([^/]+)/page/([0-9]{1,})/?$', 'index.php?pagename=blog&pg=$matches[3]&market=$matches[1]&category=$matches[2]', 'top'); | |
add_rewrite_rule('blog/market/([^/]+)/category/([^/]+)/?$', 'index.php?pagename=blog&market=$matches[1]&category=$matches[2]', 'top'); | |
add_rewrite_rule('blog/market/([^/]+)/page/([0-9]{1,})/?$', 'index.php?pagename=blog&pg=$matches[2]&market=$matches[1]', 'top'); | |
add_rewrite_rule('blog/market/([^/]+)/?$', 'index.php?pagename=blog&market=$matches[1]', 'top'); | |
add_rewrite_rule('blog/category/([^/]+)/page/([0-9]{1,})/?$', 'index.php?pagename=blog&paged=$matches[2]&category=$matches[1]', 'top'); | |
add_rewrite_rule('blog/category/([^/]+)/?$', 'index.php?pagename=blog&category=$matches[1]', 'top'); |
I tested the following script on a vagrant box.
The box was 850MB without the script, and 450 MB with the script.
The script was taken from chef/bento with just one modification.
#!/usr/bin/env bash | |
# source: http://superuser.com/a/224263/41059 | |
# OpenSSL requires the port number. | |
SERVER=$1:443 | |
DELAY=1 | |
echo Obtaining cipher list from $(openssl version). | |
ciphers=$(openssl ciphers 'ALL:eNULL' | sed -e 's/:/ /g') |
{ | |
role: 'admin', | |
enabled: true, | |
firstname: 'Test', | |
lastname: 'User', | |
identities: { | |
basic: { | |
username: 'admin', | |
salt: '225384010328', | |
hash: '885f59a76ea44e1d264f9da45ca83574fbe55e3e7e6c51afe681730b45c7bb03' |
loadGruntConfigAndDependencies('./initConfig/'); | |
function loadGruntConfigAndDependencies (files) { | |
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); | |
grunt.initConfig(loadConfig(files)); | |
} | |
function loadConfig(files) { | |
var path = require('path'), | |
object = {}; |
[alias] | |
lg1 = log --graph --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white)— %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative | |
lg2 = log --graph --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(bold white)— %an%C(reset)' --abbrev-commit | |
logo = log --oneline | |
stat = log --stat |
//Wait for relevant code bits to load before starting any tests | |
define(['core.js'], function( core ) { | |
module("Core Tests"); | |
test("Test core methods", function(){ | |
expect(2); | |
equals( 1, 1, "A trivial test"); | |
ok( true, "Another trivial test"); | |
}); |
var DISQUS = function (e) { | |
var g = e.DISQUS || {}; | |
g.AssertionError = function (b) { | |
this.message = b | |
}; | |
g.AssertionError.prototype.toString = function () { | |
return "Assertion Error: " + (this.message || "[no message]") | |
}; | |
g.assert = function (b, d, f) { | |
if (!b) if (f) e.console && e.console.log("DISQUS assertion failed: " + d); |
DISQUS.addBlocks("theme")(function (d) { | |
d.blocks.letUsKnow = function (f, c) { | |
var a = new d.Builder, | |
h = DISQUS.extend({}, f, c); | |
with(h) return a.put('<a href="https://www.surveymonkey.com/s/GHK872T" target="_blank">'), a.put(gettext("Let us know.")), a.put("</a>"), a.compile() | |
}; | |
d.blocks.relatedThread = function (f, c) { | |
var a = new d.Builder, | |
h = DISQUS.extend({}, f, c); | |
with(h) return a.put(' <li class="discovery-unit"> <div class="discovery-heading-wrapper"> <h3 title="'), a.put((a.esc || function (a) { |