#Covert Data URI to Blob
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 { Meteor } from 'meteor/meteor'; | |
import { Tasks } from '/imports/common/collections'; | |
// The workerId should be unique, and at the same time it should persist | |
// across server restarts, because otherwise we may end up with unfinished tasks falling into limbo. | |
const workerId = process.env.WORKER_ID || 'theOnlyWorker'; | |
const tasksInProgress = {}; | |
const makeTaskProcessor = execute => (task) => { | |
if (!task.workerId) { |
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
// Based on: | |
// http://stackoverflow.com/questions/118241/calculate-text-width-with-javascript | |
export function fontSize (el = document.body) { | |
const test = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
const div = document.createElement('div'); | |
div.style.position = 'absolute'; | |
div.style.visiblity = 'hidden'; | |
div.style.height = 'auto'; | |
div.style.width = 'auto'; | |
div.style.whiteSpace = 'nowrap'; |
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 | |
if [ ! -e $HOME/.meteor ]; | |
then | |
sudo curl https://install.meteor.com/ | sh | |
fi | |
sudo apt-get update | |
sudo apt-get install -y python-software-properties | |
sudo add-apt-repository ppa:chris-lea/node.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
#!/bin/sh | |
# This is the Meteor install script! | |
# Are you looking at this in your web browser, and would like to install Meteor? | |
# Just open up your terminal and type: | |
# | |
# curl https://install.meteor.com/ | sh | |
# | |
# Meteor currently supports: | |
# - Mac: OS X 10.6 and above |