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 | |
# before pushing code | |
# Run sniffer and fixer. | |
DOCKER_EXEC_COMMAND="docker exec --workdir /path/to/project container-name" | |
# Exclude warnings for now. | |
PHPCBF_COMMAND="vendor/bin/phpcbf --report=summary --standard=.phpcs.xml --warning-severity=0 --colors" | |
# Get a list of all files to be pushed |
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 ruby | |
submods = Hash.new | |
%x{git config -f .gitmodules --get-regexp '^submodule\..*\.(path|url)$'}.lines.each do |l| | |
submodule, key, value = l.match(/^submodule\.(.*)\.(path|url)\s+(.*)$/)[1..3] | |
submods[submodule] = Hash.new unless submods[submodule].is_a?(Hash) | |
submods[submodule][key] = value | |
end |
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 | |
# copy moodle database | |
set -x | |
set -e | |
if [ $1 ] ; then | |
DBFROM=$1 | |
fi | |
if [ $2 ]; then |
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 | |
# Scan for moodle deprecated functions in use | |
# Start from base directory | |
grep '^function' lib/deprecatedlib.php | cut -d ' ' -f 2 | cut -d '(' -f 1 | while read -r line ; do grep -rn "$line(" path/to/plugin ; 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
#!/bin/bash | |
set -x | |
if [ $1 ] ; then | |
DBFROM=$1 | |
fi | |
if [ $2 ]; then | |
DBTO=$2 | |
fi |
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 | |
set -x | |
set -e | |
if [ $1 ] ; then | |
DB=$1 | |
fi | |
if [ $2 ]; then | |
FILE=$2 |
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
commit fbb65a025eacfc2842dc7a34d09b82c64d554041 | |
Author: Chris Wharton <chris.wharton@catalyst-eu.net> | |
Date: Wed Dec 17 14:34:54 2014 +0000 | |
local/client: Hide evidence tab from Record of Learning | |
diff --git a/lang/en/local_client.php b/lang/en/local_client.php | |
index 2dc6804..8dc1fa6 100644 | |
--- a/lang/en/local_client.php | |
+++ b/lang/en/local_client.php |
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
commit 5472efadcbe6fb1b2e45fdd06c80fbf97254245b (HEAD, refs/heads/theme-2.5-custom-dev) | |
Author: Chris Wharton <chris.wharton@catalyst-eu.net> | |
Date: Thu Oct 30 12:08:53 2014 +0000 | |
theme/custom: Add customcss setting | |
This is mainly for rapid fixes in between deployments. | |
diff --git a/config.php b/config.php | |
index 771b853..193a882 100644 |
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
= ssd cache setup= | |
I got a new pc with an SSD and a spinner disk. Having to decide exactly what I think I needed on the SSD was hard. Why not try using it as a caching device? | |
==Why use ssd caching?== | |
* Intel's "Smart Response Technology" on Windows 7 is awesome | |
* SSD wear can be reduced | |
* The ssd use can be optimized automagically | |
* No compromise on free space on ssd vs empty space on hdd | |
===What runs slow normally for me?=== |
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 | |
# kill active pg connections and drop the requested db | |
DB=$1 | |
psql -ec "SELECT pg_terminate_backend(pg_stat_activity.procpid) FROM pg_stat_activity WHERE pg_stat_activity.datname = '$DB' AND procpid <> pg_backend_pid();" postgres | |
dropdb $DB | |
exit 0; |
NewerOlder