Skip to content

Instantly share code, notes, and snippets.

@theotherdy
theotherdy / 4.3.1_seq1-10.r
Last active October 5, 2018 09:11
4.3 Data Management: Essential Commands 6-10
# by isn't needed
seq(from = 1, to = 10) # I could get the same result with seq(1, 10)
@theotherdy
theotherdy / canvas-gist-embed.js
Last active October 5, 2018 11:20
Using gist-embed to embed GitHub gists nicely in instructure Canvas - see: https://learntech.imsu.ox.ac.uk/blog/embedding-a-github-gist-in-instructure-canvas/
(function () { //method from: https://community.canvaslms.com/thread/22500-mobile-javascript-development
// The following function will retrieve and load a JavaScript file - https://www.nczonline.net/blog/2009/07/28/the-best-way-to-load-external-javascript/
function loadScript(url, callback) {
var script = document.createElement("script");
script.type = "text/javascript";
if (script.readyState) { //IE
script.onreadystatechange = function () {
if (script.readyState == "loaded" || script.readyState == "complete") {
script.onreadystatechange = null;
callback();
@theotherdy
theotherdy / canvas-gist-embed.html
Last active October 5, 2018 11:35
Using gist-embed to embed GitHub gists nicely in instructure Canvas - see: https://learntech.imsu.ox.ac.uk/blog/embedding-a-github-gist-in-instructure-canvas/
<p>Text afore gist</p>
<p data-gist-id="572406dce62dc51f8dfd392f3458e7e7" data-gist-hide-footer="true">&nbsp;</p>
<p>Text after gist</p>