Skip to content

Instantly share code, notes, and snippets.

View marcus7777's full-sized avatar
:octocat:
Working from bike

Marcus Hitchins marcus7777

:octocat:
Working from bike
View GitHub Profile
@marcus7777
marcus7777 / index.js
Last active August 29, 2015 14:08 — forked from miketamis/index.js
var WebTorrent = require('webtorrent');
var domify = require('domify')
document.body.appendChild(domify("loading..."));
var infohash = "3a3cca2992987699def85776f58c3c510bc2b166";
var client = new WebTorrent()
function onTorrent(torrent) {
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../google-map/google-map.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="../google-map/google-map-search.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<polymer-element name="my-element">
@marcus7777
marcus7777 / Usage.html
Last active August 29, 2015 14:16 — forked from zdarovka/Usage.html
<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>
#!/bin/sh
cd /home/dstrt/www
unset GIT_DIR
git pull origin master
@marcus7777
marcus7777 / Readme.md
Last active August 29, 2015 14:25 — forked from olivernn/Readme.md

Getting Started with Lunr

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>
<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>
@marcus7777
marcus7777 / index.html
Last active September 1, 2015 10:35 — forked from anonymous/index.html
pair-production demo// source http://jsbin.com/xuzute
<!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>
@marcus7777
marcus7777 / progressive-ace.htm
Created September 28, 2015 17:56 — forked from duncansmart/progressive-ace.htm
Integrating ACE Editor in a progressive way
<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 () {
@marcus7777
marcus7777 / tmux-cheatsheet.markdown
Created January 20, 2016 15:39 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@marcus7777
marcus7777 / index.html
Last active March 22, 2016 11:34 — forked from akki777-zz/index.html
Trial on paper-swatch-picker
<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>