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
-- Cleans up any data that might be remnant after a run of the RelationshipGeneratorPluginIntegrationTest, | |
-- particularly if the run fails for some reason, it might not execute its tearDown() and can leave remnant | |
-- data in the database. | |
-- NOTE YOU WILL NEED TO MODIFY SOME OF THE HARDCODED VALUES IN HERE TO SUIT YOUR CURRENT DATABASE | |
-- Alternatively this could probably be improved to use more of the "code like '%...%'" and less of the "id > X" style | |
delete from ca.ca_attribute_values where value_id > 14; | |
delete from ca.ca_attributes where table_num = 57 and element_id = 70 and row_id > 46; |
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
maxdepth=`find . -printf '%d\\n' | sort -n | tail -1` && for depth in `seq 1 $maxdepth`; do find -mindepth 1 -maxdepth $depth -exec bash -c 'f=`echo "{}" | sed -r s:\\\s+:_:g` ; if [ "$f" != "{}" ]; then mv "{}" "$f"; fi' \; ; done |
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 php | |
<?php | |
$screen = 35; // modify as required | |
$locale = 'en_AU'; | |
$pdo = new PDO('mysql:host=wamcmisdb01-staging;dbname=cmis', 'cmis', 'uhkdv5Uwhkk7pmv'); | |
$placements = $pdo->query('select * from ca_editor_ui_bundle_placements where screen_id = ' . $screen . ' order by rank asc')->fetchAll(); | |
foreach ($placements as $placement) { | |
$settings = unserialize(base64_decode($placement['settings'])); |
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 | |
# http://nigel.mcnie.name/blog/removing-the-referer-part-of-php-error-messagse-from-apache-logs | |
perl -pe 's/\s+\[\:error\]\s+\[pid\s+\d+\]\s+\[client\s+.*?\]//; s/, referer:.*//' |
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/php | |
<?php | |
// This is the input array. | |
$values = array( | |
array( | |
'title' => 'First item (1,1)', | |
'categoryID' => 1, | |
'storeID' => 1 | |
), |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Knockout Date Selector</title> | |
</head> | |
<body style="background-color:#eee;font-family:sans-serif;"> | |
<article style="width:600px;background-color:#fff;margin:1em auto;border:1px solid #000;padding:1em;"> | |
<h1>Knockout Date Selector</h1> | |
<p> |
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
/*jslint node: true, white: true, nomen: true, plusplus: true*/ | |
/*globals require: true, process: true*/ | |
/*! | |
* Generic load tester | |
* Copyright (c) 2013 Leftclick.com.au | |
* MIT License, or whatever. | |
* Author assumes no liability for damage, loss, etc. | |
* | |
* Configuration is passed as a command-line argument when running node, e.g. |
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 | |
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash - | |
sudo apt-get install nodejs | |
sudo chown -R $USER /usr/lib/node_modules/ | |
sudo chgrp $USER /usr/bin | |
sudo chmod g+w /usr/bin |
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 | |
# | |
# git-update | |
# Pull down latest from git remote and remove dead branches | |
# | |
# To create an alias to `git update`, put this on your path, then: | |
# git config --global alias.update '!git-update' | |
# | |
# Copyright (c) 2016 Leftclick.com.au | |
# License: MIT |
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 () { | |
'use strict'; | |
// Relevant resource: https://gist.github.com/spencermefford/bc73812f216e0e254ad1 | |
module.exports = function (server, callback) { | |
var ACL = server.models.ACL, | |
User = server.models.User, | |
Role = server.models.Role, | |
RoleMapping = server.models.RoleMapping; |
OlderNewer