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 | |
# Find uses in .feature files corresponding to deleted strings for a given commit. | |
# Far from ideal for multiline strings, but does its work for 1 line ones. | |
# Usage: within a git repo: check_lang_string_uses.sh <commit>. Look for ERROR @ output. | |
commit=${1:-HEAD} | |
count=0 | |
retcode=0 |
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
<?php | |
define('CLI_SCRIPT', true); | |
require_once('config.php'); | |
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php'); | |
$course_module_to_backup = 1; | |
$section_to_backup = 2; | |
$course_to_backup = 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
<?php | |
$brokenhtml = '<p>this is broken</p>because i want to </div></div></div><script><script type="text/javascript"><!--'; | |
echo fixhtmlplz($brokenhtml) . "\n\n"; | |
$brokenhtml = '<b>because <i>I can leave <p>everything <div> unclosed | |
using many <span> lines and <ul> more yet <li> lists | |
<li> more and | |
<li> more'; | |
echo fixhtmlplz($brokenhtml) . "\n\n"; |
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 | |
# pre-push hook to enable/disable travis and github actions push builds | |
# based on the nature of the pushed branches. | |
# - upstream and deleted ones won't be built. | |
# - development ones will be built. | |
# Requires travis (client) gem binary installed. | |
# Requires gh (client) binary installed. | |
# Useful for people wanting to keep their upstream branches updated, | |
# and not causing them to perform travis/github actions builds all the time, like me :-) | |
IFS=' ' |
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 | |
while read -r line; do | |
echo Processing: $line | |
if [[ ${line} =~ ^\"MDL-[0-9]*\",\"(.*)\" ]]; then | |
versions=${BASH_REMATCH[1]} | |
echo Versions: ${versions} | |
IFS=',' read -ra versionsarr <<< "$versions" | |
for version in "${versionsarr[@]}"; do | |
echo $version |
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 | |
# Find uses of deleted strings for a given commit within codebase. | |
# May lead to false positives but easily detectable in any case. | |
# | |
# Usage: within a git repo: verify_deprecated_string_uses.sh <commit>. Look for ERROR @ output or exit code. | |
commit=${1:-HEAD} | |
status=0 | |
pushd "$(git rev-parse --show-toplevel)" > /dev/null | |
echo "Checking commit ${commit}" | |
while read -r line; do |
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
diff --git a/grade/report/grader/lib.php b/grade/report/grader/lib.php | |
index 18e7c16..a246696 100644 | |
--- a/grade/report/grader/lib.php | |
+++ b/grade/report/grader/lib.php | |
@@ -838,6 +838,12 @@ class grade_report_grader extends grade_report { | |
} | |
} else { | |
// Element is a grade_item | |
+ if ($element['object']->itemname == 'One database') { | |
+ $element['object']->itemname = 'Deletion in progress'; |
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
FROM ubuntu:xenial | |
RUN \ | |
apt-get update && \ | |
DEBIAN_FRONTEND=noninteractive apt-get install -y unoconv && \ | |
apt-get clean && \ | |
rm -rf /var/lib/apt/lists/ | |
# Get latest unoconv script and hack it to use python3. | |
# (it fixes an issue about unoconv listener failing first time with libreoffice). |
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/local/bin/salt-cron.sh: | |
file.managed: | |
- user: root | |
- group: root | |
- source: salt://system/cron/salt-cron.sh | |
- mode: 755 | |
/usr/bin/chronic /usr/local/bin/salt-cron.sh | /usr/bib/logger -t salt-cron: | |
cron.present: | |
- identifier: SALT |
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
Reference: https://github.com/sebastianbergmann/phpunit/issues/3185 | |
stronk7@~/git_moodle/moodle (phpunit70 *$%)$ git diff mod/quiz | |
diff --git a/mod/quiz/tests/attempt_walkthrough_from_csv_test.php b/mod/quiz/tests/attempt_walkthrough_from_csv_test.php | |
index 3556793f612..029dbd2ffb1 100644 | |
--- a/mod/quiz/tests/attempt_walkthrough_from_csv_test.php | |
+++ b/mod/quiz/tests/attempt_walkthrough_from_csv_test.php | |
@@ -338,7 +338,7 @@ class mod_quiz_attempt_walkthrough_from_csv_testcase extends advanced_testcase { | |
$this->assertEquals((bool)$value, $attemptobj->is_finished()); | |
break; |
OlderNewer