A userstyle that makes you wait ten seconds before entering a Hacker News thread. I use stylus to manage mine.
.subtext {
display: inline-block;
background: linear-gradient(to left, transparent 50%, #f60 50%) right;
A userstyle that makes you wait ten seconds before entering a Hacker News thread. I use stylus to manage mine.
.subtext {
display: inline-block;
background: linear-gradient(to left, transparent 50%, #f60 50%) right;
const bypass = [ | |
// function names to avoid logging | |
]; | |
const collapsed = [ | |
// function names to groupCollapsed | |
]; | |
module.exports = function(babel) { | |
const { types: t } = babel; | |
const wrapFunctionBody = babel.template(`{ |
All libraries have subtle rules that you have to follow for them to work well. Often these are implied and undocumented rules that you have to learn as you go. This is an attempt to document the rules of React renders. Ideally a type system could enforce it.
A number of methods in React are assumed to be "pure".
On classes that's the constructor, getDerivedStateFromProps, shouldComponentUpdate and render.
This is a Cheat Sheet for interacting with the Mongo Shell ( mongo on your command line). This is for MongoDB Community Edition.
Mongo Manual can help you with getting started using the Shell.
FAQ for MongoDB Fundamentals and other FAQs can be found in the side-bar after visiting that link.
// | |
// Our main data fetching tool. | |
// This fetches an object of promise makers ONLY ON THE CLIENT SIDE, | |
// and manages loading and data states for each key. | |
// | |
import React from 'react' | |
import http from './http' | |
export default (promisesMakers, options={}) => Component => | |
class FetchHOC extends React.Component { |
// connect() is a function that injects Redux-related props into your component. | |
// You can inject data and callbacks that change that data by dispatching actions. | |
function connect(mapStateToProps, mapDispatchToProps) { | |
// It lets us inject component as the last step so people can use it as a decorator. | |
// Generally you don't need to worry about it. | |
return function (WrappedComponent) { | |
// It returns a component | |
return class extends React.Component { | |
render() { | |
return ( |
Learn how you can create your own Twitter bot using Node.js and the new Twitter API. The bot will auto retweet in response to tweets with some particular hashtags. (https://goo.gl/4whEIt)
Here are the tools we’ll be using to create the bot —
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
<meta name="author" content=""> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
<html> | |
<head>Quizzy Part 1 MVC</head> | |
<body> | |
<div id="app"></div> | |
<script src="vendor/mithril.js" type="text/javascript"></script> | |
<script src="quiz.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
Quiz.vm.questions([ |