I hereby claim:
- I am jmendiara on github.
- I am jmendiara (https://keybase.io/jmendiara) on keybase.
- I have a public key whose fingerprint is B818 2FBD 2CED 9DF0 1D2C 9A19 C4CF 4990 702C E9F7
To claim this, I am signing this object:
import LRU from 'lru-cache'; | |
/** | |
* Small utility around an LRU cache that gives us some features: | |
* - Promisification: Async ready to easily change to a memcached/redis implementation | |
* - Improved get method, to make more expressive usage of the pattern "if not found | |
* in the cache, go get it, store in the cache, and return the value" | |
* - Funnel values: Promises are stored and returned, so if the value for a key | |
* is being obtained while another get is requested, the promise of the value is returned | |
* so only one request for value is done |
import { TaskQueue, TaskSuccessEvent, TaskErrorEvent, QueueStartEvent, QueueCompleteEvent } from "/taskqueue"; | |
// Define several task with optional titles | |
const firstTask = () => new Promise<void>((resolve, reject) => setTimeout(resolve, 1000)); | |
firstTask.title = '1 second timeout'; | |
const secondTask = () => new Promise<void>((resolve, reject) => setTimeout(() => reject(new Error('boom!')), 1000)); | |
secondTask.title = '1 second failed timeout'; |
I hereby claim:
To claim this, I am signing this object:
var sensorLib = require('node-dht-sensor'); | |
var sensor = { | |
initialize: function () { | |
return sensorLib.initialize(22, 22); | |
}, | |
read: function () { | |
var readout = sensorLib.read(); | |
console.log('Temperature: ' + readout.temperature.toFixed(2) + 'C, ' + | |
'humidity: ' + readout.humidity.toFixed(2) + '%'); |
This is an opinionated list of desired Angular capabilities and feature lacks, to open debate and looking for best ways to solve them
httpu.headers
helps on solving this issue.$cacheFactory.Cache
is private: This causes reimplementing all the logic for a $cacheFactory API, instead of letting users to specify with kind of cache a $cacheFactory is returning.$cacheFactory.Cache
key is generated: You have to decorate all your $cacheFactory implementations ($cacheFactory.Cache is private). Exposing a key generator method somewhere may helpgrunt.initConfig( | |
//The build task is in charge of creating a compilation enforcing | |
//one parameter in the HTML code: the url | |
build: { | |
//The default options for the build task | |
options: { | |
//The source file | |
src: 'app/index.html' | |
} | |
/* |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> | |
<style type="text/css"> | |
p { | |
line-height:32px; | |
font-size:28px; | |
font-family:Arial, Helvetica, sans-serif; | |
} |