Skip to content

Instantly share code, notes, and snippets.

View andrewnicols's full-sized avatar

Andrew Lyons andrewnicols

  • Moodle Pty Ltd
  • Perth, Australia
View GitHub Profile
mahara_122=# select * from block_instance where view = 8;
id | blocktype | title | configdata | view | column | order
----+------------------+--------------------+------------+------+--------+-------
46 | groupviews | Group Views | a:0:{} | 8 | 1 | 3
30 | groupmembers | Members | N; | 8 | 1 | 4
33 | groupinfo | | N; | 8 | 1 | 1
32 | recentforumposts | Latest Forum Posts | N; | 8 | 1 | 2
(4 rows)
<?php
/**
* This example compares mb_string and iconv_string in the way that they're
* used in moodle's break_up_long_words() function. That is to say that it
* runs in a loop taking each character in turn
*/
set_time_limit(0);
@andrewnicols
andrewnicols / gist:1752744
Created February 6, 2012 15:43
php constant fail
<?php
define("V", "Variable");
define("V ", "Bad");
var_dump(V);
var_dump(V );
var_dump(constant('V'));
var_dump(constant('V '));
YUI.add('moodle-block_codex_about-toggler', function(Y) {
// Define a name space to call
M.block_codex_about = M.block_codex_about || {};
M.block_codex_about.toggler = {
init: function() {
// Delegate adds a single event listener rather than one per .codex_about_link
// There's no need to loop through and get the IDs and then pass them to the eventHandler as the targetted
// Node is available to the eventHandler in any case.
Y.delegate('click', this.toggleShow, Y.config.doc, '.codex_about_link', this);
/**
* A description of the module.
*
* @module moodle-FRANKENSTYLE-YUIMODNAME
*/
/**
* A description of the class. Most of the time, this will be the same as
* the module, but it is possible to have multiple classes within a single
* module.
/**
* A description of the module.
*
* @module moodle-FRANKENSTYLE-YUIMODNAME
*/
/**
* A description of the class. Most of the time, this will be the same as
* the module, but it is possible to have multiple classes within a single
* module.
@import "variables.less";
.navbarVerticalAlign(@elementHeight) {
margin-top: (@navbarHeight - @elementHeight) / 2;
}
.border-radius(@radius) {
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
border-radius: @radius;
}
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
/usr/local/bin/git remote -v
/usr/local/bin/git config --get remote.origin.url
/usr/local/bin/git remote -v
/usr/local/bin/git config --get remote.origin.url
/usr/local/bin/php /private/srv/www/loganberry.local/data/im_my/moodle/admin/tool/phpunit/cli/init.php
Initialising Moodle PHPUnit test environment...
PHPUnit ready!
vendor/bin/phpunit
Moodle 2.7dev (Build: 20140314), mysqli, 4826ed1177c0d4c3d18b41525d6088150081a655
PHPUnit 3.7.28 by Sebastian Bergmann.
#!/bin/bash
# Sensible defaults.
targettime="8pm"
keyfile="$HOME"/.ssh/id_rsa
privatekeydir=""
publickeydir=""
reporoot="$HOME"/git
# Define the default tunnels.