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
/* player CSS responsive 100% width */ | |
.embed-container { | |
position: relative; | |
padding-bottom: 56.25%; | |
height: 0; | |
overflow: hidden; | |
max-width: 100%; | |
} | |
.embed-container iframe, | |
.embed-container object, |
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 | |
/** | |
* This PHP Script for Moodle that will set as "deleted" all messages for a given user and date. | |
* It will insert a row in message_user_actions for every meesage to be deleted. | |
* Messages will stil exist, but won't display in Messages page view. | |
*/ | |
// get moodle libs | |
require_once('config.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
/** | |
* This script will automatically redirect the last html page of the SCORM package | |
* to the moodle course main page. The courseId and wwwroot is read from Moodle JS object "M". | |
* | |
* Important: this script will only work with a SCORM package running on a Moodle course. | |
* The script must be placed on the last HTML page the SCORM displays, for example | |
* in "Articulate Storyline" it should be the "/scormdriver/goodbye.html" file. | |
*/ | |
(function() { |
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
"workbench.colorCustomizations": { | |
"scrollbarSlider.activeBackground": "#fff", | |
"scrollbarSlider.hoverBackground": "#f19feb", | |
"scrollbarSlider.background": "#612883", | |
"sideBar.border": "#ffe600", | |
"tab.activeBackground": "#612883", | |
"tab.activeBorder": "#8b1277", | |
"sideBySideEditor.horizontalBorder": "#ff0000", | |
"panel.border": "#ffe600", | |
"editorGroup.border": "#df0ebc" |
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 | |
function debug_log($var, $label = '') { | |
$labelcontent = $label ? $label.' ' : ''; | |
$content = PHP_EOL | |
.date('Y-m-d H:i:s').' ' | |
.$labelcontent | |
.print_r($var, TRUE) | |
.PHP_EOL; | |
error_log($content, 3, dirname(__FILE__).'/debug.log'); |
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
/** | |
* Fake a delay | |
* simulate a time delay and return promise | |
* | |
* @private | |
* @param {number} [duration=3000] | |
*/ | |
async function fakeDelay(duration = 3000) { | |
await new Promise(resolve => setTimeout(resolve, duration)); | |
} |
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
import { Injectable } from '@angular/core'; | |
import { HttpClient } from '@angular/common/http'; | |
import jsonCfg from '../../../data/config.json'; | |
@Injectable() | |
export class AppCfg { | |
constructor(private http: HttpClient) {} | |
load(): Promise<void> { |
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
/** | |
Returns a list of objects | |
1. get the list of files to fetch | |
2. fetch each file to get the object | |
3. return an array of objects | |
*/ | |
getAll(): Observable<Tutorial[]> { | |
const list = this.dataSrv.getDataList() | |
.pipe( | |
// get list from dataList |
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
<html> | |
<style> | |
.item-header { | |
grid-area: header; | |
padding: 0px; | |
} | |
.item-btn-a { | |
grid-area: btnA; | |
padding: 0px; |
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
// 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works | |
const axios = require('axios'); // promised based requests - like fetch() | |
function getCoffee() { | |
return new Promise(resolve => { | |
setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee | |
}); | |
} |
NewerOlder