Skip to content

Instantly share code, notes, and snippets.


一波不是一波 riskers

Block or report user

Report or block riskers

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
PCreations /
Last active Aug 17, 2019
Super Intuitive Interactive Diagrams to learn combining RxJS sequences by Max NgWizard K
wangcaipang / diff.js
Created May 26, 2017
react diff patch
View diff.js
export default function diff (parentNode, prevNodeMap, newNodeMap) {
let lastIndex = 0
let lastRightNode = null
let patch = []
let mountIndex = 0
for (let name in newNodeMap) {
if (newNodeMap.hasOwnProperty(name)) {
let newNode = newNodeMap[name]
let prevNode = prevNodeMap[name]
if (prevNode) {
subfuzion /
Last active Aug 25, 2019
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

View iOS 技能图谱.md


  • Swift
  • Objective-C
  • C++/C
  • JavaScript


  • Mac OSX
  • iOS
View 5 minute local Kubernetes Cluster on Mac
# Reference:
# install homebrew and cask
ruby -e "$(curl -fsSL"
# install virtualbox
brew cask install virtualbox
# install dockertoolbox
mauriciosoares / doubleclick.js
Created Oct 19, 2015
rxjs double click example
View doubleclick.js
let clickStream = Rx.Observable.fromEvent(document.getElementById('link'), 'click');
.map(list => list.length)
.filter(x => x === 2)
.subscribe(() => {
paulirish /
Last active Aug 24, 2019
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.


Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
vvgomes / foo.js
Last active Jul 29, 2019
Ramda vs Lodash
View foo.js
var _ = require("lodash");
var R = require("ramda");
var companies = [
{ name: "tw", since: 1993 },
{ name: "pucrs", since: 1930 },
{ name: "tw br", since: 2009 }
var r1 = _(companies).chain()
paulwellnerbou /
Created Jun 18, 2015
Getting git log between commits, branches and annotated tags with JGit
package de.wellnerbou.gitjira.jgit;
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
View on-jsx.markdown

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

You can’t perform that action at this time.