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/python3 | |
# | |
# Author: Jordan Tomkinson <jordan.tomkinson@ethinkeducation.com> | |
# | |
# This script automates editing and saving contentbank items to fix a bug in tool_migratehvp2h5p | |
# Requirements: sudo pip3 install mechanize | |
# Generate the csv by running this sql: | |
''' | |
select a.course_context_id, a.instance | |
from ( |
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/classes/converter.php b/classes/converter.php | |
index c2addfe..33c0826 100644 | |
--- a/classes/converter.php | |
+++ b/classes/converter.php | |
@@ -97,11 +97,14 @@ class converter implements \core_files\converter_interface { | |
public function create_client($handler=null) { | |
$connectionoptions = array( | |
'version' => 'latest', | |
- 'region' => $this->config->api_region, | |
- 'credentials' => [ |
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
Elasticache node is a single r5.large in non-clustered mode | |
KeyDB node is a single r5.large using 2 server-threads with saves disabled | |
Memtier test node is a single c5n.4xlarge | |
r5.large has 16GB memory and 2 vCPU | |
c5n.4xlarge 42GB memory and 16 vCPU | |
KeyDB is 10.1.8.245 | |
Elasticache is devredis.larpr9.0001.use2.cache.amazonaws.com |
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/library/Pdfexport/HeadlessChrome.php b/library/Pdfexport/HeadlessChrome.php | |
index 4342cc4..e034805 100644 | |
--- a/library/Pdfexport/HeadlessChrome.php | |
+++ b/library/Pdfexport/HeadlessChrome.php | |
@@ -192,15 +192,17 @@ class HeadlessChrome | |
$path = $storage->resolvePath($path, true); | |
- $chrome = new Process(join(' ', [ | |
+ $env = ['HOME'=>'/tmp']; |
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
$regex = "'blblbl'" | |
if [[ "$OSTYPE" == "linux-gnu" ]]; then | |
# Linux | |
$shasum = "/usr/bin/sha1sum" | |
$strbin = "sed -e$regex" | |
elif [[ "$OSTYPE" == "darwin"* ]]; then | |
# Mac OSX | |
$shasum = "/usr/bin/shasum" | |
$strbin = "sed -e $regex" | |
elif [[ "$OSTYPE" == "cygwin" ]]; then |