Original article: https://scotch.io/tutorials/authenticate-a-node-js-api-with-json-web-tokens
mkdir au
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
// MIT license | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |
# I battled for hours trying to install imagick via macports, trying to follow various tutorials. | |
# If you've been battling with macports, completely uninstall everything related to | |
# macports (http://guide.macports.org/chunked/installing.macports.uninstalling.html) | |
# and trying with Home Brew instead, using the instructions below | |
# install brew (http://mxcl.github.com/homebrew/) | |
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" | |
# install imagemagick |
// http://www.w3.org/TR/dom/ | |
// http://updates.html5rocks.com/2012/02/Detect-DOM-changes-with-Mutation-Observers | |
// https://developer.mozilla.org/en-US/docs/DOM/MutationObserver | |
var MutationObserver = (function () { | |
var prefixes = ['WebKit', 'Moz', 'O', 'Ms', ''] | |
for(var i=0; i < prefixes.length; i++) { | |
if(prefixes[i] + 'MutationObserver' in window) { | |
return window[prefixes[i] + 'MutationObserver']; | |
} | |
} |
(function(){ | |
'use strict'; | |
$('[data-slider]').each(function(){ | |
function d(a,b){ | |
return parseFloat(a.attr(b) || a.attr('data-'+b)); | |
} | |
#!/bin/zsh | |
# For Macs, get gource with HomeBrew: | |
# brew install gource | |
# brew install ffmpeg | |
if (( !($# == 3) )) | |
then | |
echo "Usage:" | |
echo $0 "<gravatar directory> <output file base name> <seconds per day>" |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>ANSIBlackColor</key> | |
<data> | |
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS | |
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NGMCAw | |
IDAAEAGAAtIQERITWiRjbGFzc25hbWVYJGNsYXNzZXNXTlNDb2xvcqISFFhOU09iamVj | |
dF8QD05TS2V5ZWRBcmNoaXZlctEXGFRyb290gAEIERojLTI3O0FITltiaWttcn2GjpGa |
Original article: https://scotch.io/tutorials/authenticate-a-node-js-api-with-json-web-tokens
mkdir au
<hash>
with your gist's hash):
# with ssh
git clone [email protected]:<hash>.git mygist
# with https
git clone https://gist.github.com/.git mygist
Here are the main breaking changes between the 0.x and 1.0 versions of Apollo Client.
The structure of fetchMoreResult
has been changed. Previously fetchMoreResult
used to contain data
and loading
fields, now fetchMoreResult
is what fetchMoreResult.data
used to be. This means your updateQueries
function has to change as follows:
updateQuery: (prev, { fetchMoreResult }) => {
db.getCollection('list').aggregate([ | |
{ | |
$facet: { | |
"events":[{ | |
$match: { | |
'type': 'Event' | |
} | |
}], | |
"tasks": [{ | |
$match: { |