This gist is updated daily via cron job and lists stats for npm packages:
- Top 1,000 most depended-upon packages
- Top 1,000 packages with largest number of dependencies
- Top 1,000 packages with highest PageRank score
We are planning on building a Node.js service. Here's our evaluation of the current ORM landscape:
Last updated: May 2 2016
Heroku only allows each dyno to send and receive external network traffic on a single port, which means you can't simply
run node --debug server.js
and attach your debugger to your-app.herokuapp.com:5858
.
To work around this, you can use ngrok and Heroku ngrok Buildpack to tunnel to the debugger's port and access it externally.
import { h, Component } from 'preact'; | |
/** Creates a new store, which is a tiny evented state container. | |
* @example | |
* let store = createStore(); | |
* store.subscribe( state => console.log(state) ); | |
* store.setState({ a: 'b' }); // logs { a: 'b' } | |
* store.setState({ c: 'd' }); // logs { c: 'd' } | |
*/ |
About this gist | |
With this gist I wanted to freeze some concepts about BackboneJS that could | |
save some time in the future either to me if I needed to use this functionality | |
again, or to somebody else. | |
This implementation addresses the need to retrieve some data from an API and | |
to populate a BackboneJS collection accordingly, storing the retrieved items | |
as Models inside the Collection. | |
If you want to see this functionality built into an application, have a look |
I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.
But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.
Svelte is a language.
Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?
A few projects that have answered this question:
const useThunk = (reducer, initState) => { | |
const [state, dispatch] = useReducer(reducer, initState); | |
const thunkDispatch = action => { | |
if (typeof action === "function") { | |
action(dispatch, () => state); | |
} else { | |
dispatch(action); | |
} | |
}; | |
return [state, thunkDispatch]; |
This will guide you through setting up a replica set in a docker environment using.
Thanks to https://gist.github.com/asoorm for helping with their docker-compose file!
JavaScript does not bother you too much with types (at first), which is both a blessing and a cure. But we all know the Boolean type. Boolean variables can either be true
or false
. Yes or no.
Every value in JavaScript can be translated into a boolean, true
or false
. Values that translate to true
are truthy, values that translate to false
are falsy. Simple.
This is about two ways to make that translation.