I hereby claim:
- I am remybach on github.
- I am remybach (https://keybase.io/remybach) on keybase.
- I have a public key whose fingerprint is 3A64 A933 7FF4 957E 3BB8 9554 2556 638F F3A2 131D
To claim this, I am signing this object:
{ | |
"seasons": [ | |
{ | |
"name": "Season 1", | |
"id": "S1", | |
"colour": "cyan", | |
"heroes": [ | |
{ | |
"colour": "#53070e", | |
"name": "Barbarian", |
const fetch = require("@adobe/node-fetch-retry"); | |
const fetchres = require("fetchres"); | |
const { parseStringPromise } = require("xml2js"); | |
// It appears that the node-fetch-retry lib modifies the retryOptions on this object if passed by reference so when using it do it using `{...fetchOptions}` | |
// Spreading no longer needs to happen once https://github.com/adobe/node-fetch-retry/pull/52 is merged and released. | |
const fetchOptions = { | |
retryOptions: { | |
retryInitialDelay: 1000, | |
retryOnHttpResponse: response => response.status >= 400 // retry on all 5xx and all 4xx errors |
I hereby claim:
To claim this, I am signing this object:
When I run this with sudo node ir.js
I get the following output:
1427574353828 Device(s) undefined
1427574353869 Connected RaspberryPi-IO
1427574353892 Repl Initialized
>> /home/pi/ir_test/node_modules/raspi-io/node_modules/raspi-board/lib/index.js:375
alias = alias.toString();
^
TypeError: Cannot read property 'toString' of undefined
[ | |
"ascii.coffee", | |
"bitly.coffee", | |
"chuck-norris.coffee", | |
"coin.coffee", | |
"dice.coffee", | |
"directions.coffee", | |
"hashing.coffee", | |
"hubot-irc", | |
"isup.coffee", |
This gist provides a simple JavaScript implementation of the non-standard WebKit method scrollIntoViewIfNeeded
that can be called on DOM elements.
Just use the code in index.js
in your app or website. You can see usage in the test page test.html
.
The parent element will only scroll if the element being called is out of the view. The boolean can force the element to be centered in the scrolling area.
foo = 0 | |
bar = 'baz' |
/*global module */ | |
module.exports = function(grunt) { | |
'use strict'; | |
// Project configuration. | |
grunt.initConfig({ | |
// Other config here. | |
exec: { | |
docpad: { |
// Export this as a module for RequireJS | |
typeof define === "function" && define([], function() { return Konami; }); |
num = '0' | |
fastest: `< ternary` slowest: `Regex` by 67%. | |
num = '1' | |
fastest: `Regex` slowest: `|| ternary` by 65% | |
num = '2' | |
fastest: `< ternary` slowest: `|| ternary` by 64% | |
num = '3' |