Skip to content

Instantly share code, notes, and snippets.

View lanwin's full-sized avatar
🤡
-

Steve Wagner lanwin

🤡
-
View GitHub Profile
@lanwin
lanwin / convert.js
Created February 9, 2015 16:09
Parse tshark (Wireshark) data field capture file
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) );
@lanwin
lanwin / designer.html
Created November 26, 2014 08:51
designer
<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">
public static class FunctionalBindingExtensions
{
public static Action<T2> Bind<T1, T2>(this Action<T1, T2> action, Func<T1> getValueFunc)
{
return action.Bind(getValueFunc());
}
public static Action<T1> Bind<T1, T2>(this Action<T1, T2> action, Func<T2> getValueFunc)
{