start new:
tmux
start new with session name:
tmux new -s myname
const listeners = (function listAllEventListeners() { | |
let elements = []; | |
const allElements = document.querySelectorAll('*'); | |
const types = []; | |
for (let ev in window) { | |
if (/^on/.test(ev)) types[types.length] = ev; | |
} | |
for (let i = 0; i < allElements.length; i++) { | |
const currentElement = allElements[i]; |
// for uint8array = new TextEncoder("utf-8").encode("¢"); | |
// for string = new TextDecoder("utf-8").decode(uint8array); | |
var string = new Uint8Array([0x01, 0x02]) | |
var data = new Uint8Array([0x03, 0x04, 0x05]) | |
var handle_error = function (error) { | |
cnosole.log("Error:",error) | |
} |
<!doctype html> | |
<meta charset='utf-8'> | |
<html> | |
<head> | |
<title>card-info-server-test demo</title> | |
<script src="../webcomponentsjs/webcomponents-lite.js"></script> | |
<link rel="import" href="card-info-server-test.html"> | |
</head> | |
<body> | |
<h3>card-info-server-test Demo</h3> |
<link rel="import" href="bower_components/polymer/polymer.html"> | |
<link rel="import" href="/bower_components/iron-icons/maps-icons.html"> | |
<link rel="import" href="/bower_components/neon-animation/animations/scale-up-animation.html"> | |
<link rel="import" href="/bower_components/neon-animation/animations/fade-out-animation.html"> | |
<link rel="import" href="/bower_components/paper-swatch-picker/paper-swatch-picker.html"> | |
<dom-module id="add-label"> | |
<template> | |
<paper-dialog entry-animation="scale-up-animation" exit-animation="fade-out-animation" with-backdrop> | |
<center> | |
<h2>Create a new Label</h2> |
<textarea name="my-xml-editor" data-editor="xml" rows="15"></textarea> | |
... | |
<textarea name="my-markdown-editor" data-editor="markdown" rows="15"></textarea> | |
... | |
<script src="//d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js"></script> | |
<script> | |
// Hook up ACE editor to all textareas with data-editor attribute | |
$(function () { |
<!doctype html> | |
<html> | |
<head><base href="http://open-elements.org/bower_components/new/"> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes"> | |
<title>pair-production demo</title> |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<base href="http://golowan.org/stuff/bower_components/"> | |
<script href="webcomponentsjs/webcomponents-lite.js"></script> | |
<link rel="import" href="firebase-element/firebase-document.html"> | |
<link rel="import" href="firebase-element/firebase-collection.html"> | |
</head> |
There are two ways to use lunr to index some documents, The simplest way is to just build the index client side each time the page is loaded. search.js
shows an example of this.
If your data is relatively static it might be more efficient to generate the index server side and then load this on each page load, your can see an example of generating the index in node in builder.js
.
You can load a serialised index like this:
var idx = lunr.Index.load(JSON.parse(json_string))
#!/bin/sh | |
cd /home/dstrt/www | |
unset GIT_DIR | |
git pull origin master |