dig thevangelist.github.io |awk '$2 ~ "[0-9]+"' |col
// More details: watch -d dig thevangelist.github.io
Function.prototype.method = function (name, func) { | |
this.prototype[name] = func; | |
return this; | |
}; | |
/* | |
http://stackoverflow.com/questions/3966936/method-method-in-crockfords-book-javascript-the-good-parts | |
*/ |
<!DOCTYPE html> | |
<html lang="en" id="dark"> | |
<head> | |
<meta charset="utf-8"> | |
<title>:target for alternate layouts</title> | |
<style> | |
#dark:target body { | |
background: black; | |
color: white; | |
} |
const userReducer = (state={}, action) => { | |
switch(action.type) { | |
case 'CHANGE_NAME': { | |
// Immutable way | |
state = {...state, name: action.payload} | |
break; | |
} | |
case "CHANGE_AGE": { | |
state = {...state, age: action.payload} | |
break; |
tree -I 'node_modules' -L 3 |
/* | |
No need to use the ES5 version | |
(function () { | |
var tmp = 路路路; | |
路路路 | |
}()); | |
*/ |
import { connect } from 'react-redux'; | |
import _ from 'lodash'; | |
function reduxConnected(reduxTreeQuery, fallbackValue, propName) { | |
return connect(state => ({ | |
[propName]: _.get(state, reduxTreeQuery, fallbackValue) | |
})); | |
} | |
export default reduxConnected; |
import React, { Component } from 'react'; | |
import styled, { ThemeProvider } from 'styled-components'; | |
import { modularScale } from 'polished'; | |
const BASE = '#DBECF3'; | |
const BRAND = '#062E40'; | |
const BRAND_ALT = '#34A5B6'; | |
const ATTENTION = '#F94253'; | |
const UNIT = 1; |
dig thevangelist.github.io |awk '$2 ~ "[0-9]+"' |col
// More details: watch -d dig thevangelist.github.io
// Just the exclude diff lines changed
git log --author="$(git config user.email)" --pretty=tformat: --numstat -- ':!package-lock.json' |
awk '
NF == 3 {
inserted += $1;
deleted += $2;
}
END {