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 | |
| # This script will open all files from a git diff or a git show in vim. | |
| # My bash skills are a bit primitive so this can probably be done more intelligently | |
| # Usage: | |
| # gitopen -- opens all added files that have changed since HEAD | |
| # gitopen diff HEAD -- these are the default parameters | |
| # gitopen diff master -- opens files that have changed from master |
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
| /** | |
| * Determine if SSL is used. | |
| * | |
| * @since 2.6.0 | |
| * @link http://core.trac.wordpress.org/browser/tags/3.3.2/wp-includes/functions.php#L0 | |
| * | |
| * @return bool True if SSL, false if not used. | |
| * @license GPL | |
| */ | |
| public static function is_ssl() { |
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 | |
| # 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; |
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
| = 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 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
| 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 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
| 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 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 | |
| set -x | |
| set -e | |
| if [ $1 ] ; then | |
| DB=$1 | |
| fi | |
| if [ $2 ]; then | |
| FILE=$2 |
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 | |
| set -x | |
| if [ $1 ] ; then | |
| DBFROM=$1 | |
| fi | |
| if [ $2 ]; then | |
| DBTO=$2 | |
| fi |
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/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 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 | |
| # copy moodle database | |
| set -x | |
| set -e | |
| if [ $1 ] ; then | |
| DBFROM=$1 | |
| fi | |
| if [ $2 ]; then |
OlderNewer