This file contains hidden or 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 | |
if [ $# -ne 1 ]; then | |
echo "Usage: download.sh file ..." | |
exit 1 | |
fi | |
for fn in "$@" | |
do | |
if [ -r "$fn" ] ; then | |
printf '\033]1337;File=name='`echo -n "$fn" | base64`";" | |
wc -c "$fn" | awk '{printf "size=%d",$1}' |
This file contains hidden or 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
var setupLTIScrollRequest = function() { | |
window.addEventListener('message', function(e) { | |
try { | |
var message = JSON.parse(e.data); | |
if (message.subject === 'lti.scrollTop') { | |
$('html,body').animate({ | |
scrollTop: $('.tool_content_wrapper').offset().top + message.scrollTop | |
}, message.animate); | |
} | |
} catch(err) { |
This file contains hidden or 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 { useState, useRef } from "react"; | |
import { useDocument } from "react-firebase-hooks/firestore"; | |
import throttle from "lodash/throttle"; | |
// Hook that gives you an updater function that will do throttled | |
// updates to a firebase document, and provide back to you views of | |
// the updated data (before it has persisted). | |
// | |
// arguments: a Document ref, and time in ms to throttle | |
// returns an object with following fields: |
This file contains hidden or 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
/* | |
expo-firestore-persistence-hack | |
A fragile weaving of various modules together to convince the Firestore | |
web SDK to use persistence in an un-ejected Expo app. | |
To use, first: | |
``` | |
$ expo install expo-sqlite |
OlderNewer