View .clang-format
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
--- | |
Language: Cpp | |
# @see https://clang.llvm.org/docs/ClangFormatStyleOptions.html | |
# BasedOnStyle: Mozilla | |
AccessModifierOffset: -2 | |
AlignAfterOpenBracket: Align | |
AlignConsecutiveMacros: false | |
AlignConsecutiveAssignments: false | |
AlignConsecutiveDeclarations: false | |
AlignEscapedNewlines: Right |
View test-analyse.sh
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 | |
## performs two calls to /analyse for a given session and compares responses. | |
## If both match the test passes. | |
## If a mismatch occurs or a single response is invalid then the error and the response will be logged into ./error.log | |
## Tests are repeated 50 times. | |
# config | |
# - a valid seesion id, the session has to be finished (all questions answered) | |
SESSID=<SESSID> |
View Makefile
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
CC=gcc | |
CFLAGS=-I. -Wall -pedantic -Werror -Wshadow -Wstrict-aliasing -Wstrict-overflow -g | |
all: main.o | |
$(CC) -o main main.o | |
.PHONY: clean | |
clean: |
View colors.js
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
const colors = { | |
green: text => `\x1b[32m${text}\x1b[0m`, | |
red: text => `\x1b[31m${text}\x1b[0m`, | |
yellow: text => `\x1b[33m${text}\x1b[0m`, | |
blue: text => `\x1b[34m${text}\x1b[0m`, | |
}; | |
module.exports = colors; |
View learninglocker-verify-user.js
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
/** | |
* Verify a user (bypass email verification) | |
*/ | |
db.getCollection('users').update({ | |
"_id" : ObjectId("<users:record:_id>") | |
}, { | |
"$set": { | |
"verified": "yes" | |
} | |
}); |
View 01-distinct.statements.js
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
// get a list of all verb ids | |
db.getCollection('statements').distinct('statement.verb.id'); | |
// get a list of all object activity ids | |
db.getCollection('statements').distinct( "statement.object.id"); | |
// get a list of object definition extension sub property values | |
db.getCollection('statements').distinct( "statement.object.definition.extensions.https://lxhive[dot].com/recipes/extensions/object.subType"); | |
// get a list of object id's containing "lesson" | |
db.getCollection('statements').find({"statement.object.id": /lesson/}); | |
// get a list of all verb display["en-US"] values | |
db.getCollection('statements').distinct('statement.verb.display.en-US'); |
View switch-php.sh
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 | |
### | |
# Script for switching PHP versions | |
# Ubuntu 16.x dual php install. | |
# Instructions on how to set this up: http://robosparrow.github.io/2016/12/10/php-5-on-ubuntu16.html | |
### | |
GREEN="$(tput setaf 2)" | |
RED="$(tput setaf 1)" |
View rollup.config.js
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
//..imports for rollup.config | |
//// | |
// plugin for copy | |
//// | |
import fs from 'fs'; | |
import path from 'path'; | |
const copyPlugin = function (options) { | |
return { |
View composer.json-lxhive-with-ext-mongo.json
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
{ | |
"name": "brightcookie/lxhive", | |
"description": "An open-source LRS from Brightcookie", | |
"license": "GPL-3.0", | |
"repositories": [ | |
{ | |
"type": "vcs", | |
"url": "https://github.com/sraka1/Slim" | |
} | |
], |
View stream.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
<?php | |
/** | |
* @see https://github.com/Brightcookie/lxHive/issues/91 | |
*/ | |
ini_set('display_errors', 1); | |
ini_set('display_startup_errors', 1); | |
error_reporting(E_ALL); |
NewerOlder