start new:
tmux
start new with session name:
tmux new -s myname
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))
<html> | |
<head> | |
<title>AudioPlayground</title> | |
<style>* {box-sizing: border-box;}</style> | |
</head> | |
<body> | |
<h3>AudioPlayground</h3> | |
<p>If you're happy and you know it, clap your hands!</p> | |
<script> | |
var Recording = function(cb){ |
<st-pageable-content id="pageableContent" | |
urltemplate="/Episodes/Page-{page}" appurltemplate="/serials/{page}" currentpage="{{currentPage}}" dataname="episode" | |
data="{{data}}" width="400" height="170" grid on-core-activate="{{selectView}}"> | |
<template> | |
<st-episode-tile data="{{model}}"></st-episode-tile> | |
</template> | |
</st-pageable-content> |
<!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> |
// Thanks http://stackoverflow.com/questions/1638337/the-best-way-to-synchronize-client-side-javascript-clock-with-server-date | |
var serverTimeOffset = false; | |
function getServerTime(callback) { | |
if (serverTimeOffset === false) { | |
var scripts = document.getElementsByTagName("script"), | |
URL = scripts[scripts.length - 1].src; | |
var clientTimestamp = Date.parse(new Date().toUTCString()); |
export default class FirestoreModule{ | |
constructor(apiKey,authDomain,databaseURL,projectId){ | |
this.promise=false; | |
this.db=null; | |
this.apiKey=apiKey; | |
this.authDomain=authDomain; | |
this.databaseURL=databaseURL; | |
this.projectId=projectId; | |
} | |
sudo apt update && sudo apt install xz-utils firefox-esr -y | |
curl -sL https://deb.nodesource.com/setup_10.x | sudo bash - | |
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | |
sudo apt-get install -y nodejs | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 23E7166788B63E1E | |
sudo apt update -y && sudo apt install yarn -y | |
yarn global add firebase-tools | |
yarn global add @vue/cli | |
echo "# yarn" >> ~/.profile |