Skip to content

Instantly share code, notes, and snippets.

🤡
-

Steve Wagner lanwin

🤡
-
Block or report user

Report or block lanwin

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
View react-copy-write-typings.ts
declare module "react-copy-write" {
interface ConsumerProps<TState> {
select?: any;
children: (store: TState) => any;
}
interface ISelector<TState, TRet> {
select: (store: TState) => TRet;
}
View keybase.md

Keybase proof

I hereby claim:

  • I am lanwin on github.
  • I am lanwin (https://keybase.io/lanwin) on keybase.
  • I have a public key whose fingerprint is 1B62 8305 FF00 2CB8 6832 1498 B14D EC8D 81B8 000B

To claim this, I am signing this object:

@lanwin
lanwin / index.html
Created Jun 7, 2016
Redux devtools extension with mori
View index.html
<!DOCTYPE html>
<html>
<body>
<script src="/node_modules/redux/dist/redux.js" type="text/javascript"></script>
<script src="/node_modules/mori/mori.js" type="text/javascript"></script>
<script type="text/javascript">
"use strict";
function reducer(){
return mori.hashMap('key','value');
@lanwin
lanwin / functional-utils.js
Created Sep 29, 2015 — forked from bendc/functional-utils.js
A set of pure and immutable ES2015 functions aimed to make functional JavaScript more idiomatic.
View functional-utils.js
// array utils
// =================================================================================================
const combine = (...arrays) => [].concat(...arrays);
const compact = arr => arr.filter(Boolean);
const contains = (() => Array.prototype.includes
? (arr, value) => arr.includes(value)
: (arr, value) => arr.some(el => el === value)
@lanwin
lanwin / test.html
Created Apr 23, 2015
Endless XMLHttpRequest leaves a tmp file for every request when responseType = 'blob' is set # 3
View test.html
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script type="text/javascript">
function onload(s) {
@lanwin
lanwin / example.html
Created Apr 20, 2015
Endless XMLHttpRequest leaves a tmp file for every request when responseType = 'blob' is set
View example.html
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script type="text/javascript">
function func() {
View designer.html
<link href="../core-icon-button/core-icon-button.html" rel="import">
<link href="../core-toolbar/core-toolbar.html" rel="import">
<link href="../core-header-panel/core-header-panel.html" rel="import">
<link href="../core-drawer-panel/core-drawer-panel.html" rel="import">
<link href="../core-menu/core-submenu.html" rel="import">
<link href="../core-item/core-item.html" rel="import">
<polymer-element name="my-element">
<template>
@lanwin
lanwin / gist:ad98f0b37222b4f08478
Created Apr 9, 2015
XMLHttpRequest leaves a tmp file for every request when responseType = 'blob' is set
View gist:ad98f0b37222b4f08478
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script type="text/javascript">
for(var i=0;i<10;i++) {
@lanwin
lanwin / convert.js
Created Feb 9, 2015
Parse tshark (Wireshark) data field capture file
View convert.js
var fs = require("fs");
var content = fs.readFileSync("outfile.raw",{encoding:'ascii'}).toString().trim().split(/\r?\n/g);
var text = Buffer.concat(content.map(function(line){return new Buffer(line.trim(),'hex');})).toString('ascii').trim();
text.split(/\r\n\r\n/g).forEach(function(line){
var obj = JSON.parse(line);
console.log( ' ' );
console.log( JSON.stringify(obj,null,line.length>200?2:0) );
View designer.html
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
You can’t perform that action at this time.