This file contains hidden or 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 | |
class LastLoggedInReport extends SS_Report { | |
public function title() { | |
if(isset($_GET['ago'])) { | |
$ago = (int) $_GET['ago']; | |
return "Last logged in $ago months ago"; | |
} |
This file contains hidden or 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
C F C F F | |
R F F F F | |
F F F F F | |
F R F F C | |
F F F F C | |
C C F F F | |
F F F F F | |
F F F F F | |
F C C R F | |
F C F F C |
This file contains hidden or 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 | |
# Compares response times on a specific URL on different SilverStripe versions. | |
# | |
# USAGE: bench.sh <base-path> <base-url> | |
basepath=$1 | |
baseurl=$2 | |
urls="/?flush=all /" | |
abparams="-n 10" |
This file contains hidden or 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
<!doctype html> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<% if $Title %><title>$Title</title><% end_if %> | |
</head> | |
<body onload="window.print();"> | |
<% if $Title %><h3>$Title</h3><% end_if %> | |
<table> | |
<thead> | |
<tr> |
This file contains hidden or 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
set :composer_bin, false | |
set :composer_options, "--no-scripts --verbose" | |
namespace :composer do | |
desc "Gets composer and installs it" | |
task :get, :roles => :app, :except => { :no_release => true } do | |
if remote_file_exists?("#{previous_release}/composer.phar") | |
pretty_print "--> Copying Composer from previous release" | |
run "#{try_sudo} sh -c 'cp #{previous_release}/composer.phar #{latest_release}/'" | |
puts_ok |
This file contains hidden or 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 | |
class HTTPisBorkedTest extends SapphireTest { | |
public function testAbsoluteUrls() { | |
// should leave external urls along | |
$this->assertEquals('<a href="http://external.com">', HTTP::absoluteURLs('<a href="http://external.com">')); | |
} | |
} |
This file contains hidden or 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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
lint: { | |
all: ['wcc/js/*.src.js'] | |
}, | |
meta: { | |
banner: '/*! DNA Designed Communications Limited | Copyright 2012 */' | |
}, | |
less: { | |
development: { |
This file contains hidden or 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
--- | |
Name: app | |
After: framework/routes#coreroutes | |
--- | |
Director: | |
rules: | |
'dev': 'DevelopmentAdmin' | |
'sitemap.xml': 'GoogleSitemap' | |
'$Action' : 'BaseController' |
This file contains hidden or 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_value auto_prepend_file header.php | |
php_value auto_append_file footer.php |
This file contains hidden or 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 | |
/** | |
* Loads tweets onto a SilverStripe object through a XML file rather than the | |
* web API. | |
* | |
* Usage: | |
* | |
* // PHP | |
* function Tweets() { |