Skip to content

Instantly share code, notes, and snippets.

View frequent's full-sized avatar

Sven Franck frequent

View GitHub Profile
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*global self, buffer */
(function (worker_instance) {
"use strict";
//JavaScript Audio Resampler (c) 2011 - Grant Galitz
var INCORRECT_BUFFER_LENGTH = "Buffer was of incorrect sample length.";
var INCORRECT_SETTINGS = "Invalid settings specified for the resampler.";
@frequent
frequent / gist:da0dd977fb0cf0e9177a32f9a08fd379
Created June 14, 2016 09:59
PyData Hyperconvergence Tutorial: Graph Gadget HTML
/*global window, rJS, console, RSVP, Dygraph */
/*jslint indent: 2, maxerr: 3 */
(function (rJS) {
"use strict";
var ARRAY_VALUE_LENGTH = 8,
OPTION_DICT = {
start_date: 0,
time_factor: 1000,
resolution: 1,
@frequent
frequent / gist:1269cadfcda31ec6a03fc0778d55c3dd
Last active June 14, 2016 08:16
PyData Hyperconvergence Tutorial: Updated Graph Gadget HTML
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>PyData Graph</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
@frequent
frequent / gist:1d12343b86332d43f4262ab6dda5e415
Last active June 14, 2016 08:07
PyData Hyperconvergence Tutorial: Graph Gadget JS
/*global window, rJS, RSVP, URI */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, URI) {
"use strict";
rJS(window)
// Init local properties
.ready(function (g) {
g.props = {};
})
// Assign the element to a variable
@frequent
frequent / gist:794f8374560380a39c74718736c08ced
Last active June 14, 2016 08:09
PyData Hyperconvergence Tutorial: Graph Gadget HTML
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>PyData Graph</title>
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_erp5_page_pydata.js" type="text/javascript"></script>
</head>
@frequent
frequent / gist:0e9ca7ae840a2a8b3882
Created August 21, 2015 09:56
template for Xiaowu
<!-- field-search with tags and filter button -->
<script id="field-search-template" type="text/x-handlebars-template">
<div class="field_container">
<div class="ui-field-contain">
<div class="css-compatability-helper">
<div class="ui-input-text ui-body-{{theme}} ui-input-has-icon ui-corner-all ui-shadow-inset ui-input-has-clear {{status_class}} {{css_class}}">
<form class="save_form document_form">
<input type="text" data-enhanced="true" value="{{value}}" name="search" {{status_attribute}} />
<div class="ui-btn ui-input-clear ui-input-btn ui-corner-all ui-icon-search ui-btn-icon-notext" data-i18n="[node]{{search_i18n}}">
{{search_i18n}}<input tabindex="-1" data-role="button" data-enhanced="true" type="submit" data-i18n="[value]{{search_i18n}}" value=" " {{status_attribute}} />
@frequent
frequent / index.html
Created August 12, 2015 08:26
rtc-brainstorming
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
<!--
<script type="text/javascript" src="sockjs-client.js"></script>
<script type="text/javascript" src="webtcp_client.js"></script>
/* --------------------------- gadget_core.css -------------------------- */
/*
=========================================================================
================================ fonts =================================
=========================================================================
*/
/* global reference font-size (.9em = 14.4px) */
html.ui-mobile body div p,
html.ui-mobile body div a,
html.ui-mobile body div button,
@frequent
frequent / navigation.js
Created July 1, 2014 07:51
JQM navigation gadget, which allows deeplinking and (uri encoded) query parameters
/*jslint indent: 2, maxlen: 80, nomen: true */
/*global console, window, document, rJS, RSVP, $ */
(function (window, document, rJS) {
"use strict";
rJS(window)
/**
* Override navigation of jQuery Mobile and allow deeplinking. Missing
* pages will now be loaded and added to the DOM as new page-gadgets -
@frequent
frequent / gist:48507187ef8c006c6d15
Created May 27, 2014 17:17
how to drop a gadget?
/*jslint indent: 2, maxlen: 80, nomen: true */
/*global console, window, document, rJS, RSVP, $ */
(function (window, document, rJS) {
"use strict";
rJS(window)
/**
* Override navigation of jQuery Mobile and allow deeplinking. Missing
* pages will now be loaded and added to the DOM as new gadgets - and