Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head><title>SOUND</title></head>
<body>
<div>Frequence: <span id="frequency"></span></div>
<script type="text/javascript">
var audioCtx = new (window.AudioContext || window.webkitAudioContext)();
var oscillatorNode = audioCtx.createOscillator();
var gainNode = audioCtx.createGain();
<html><head></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;"><html>
<head>
<title>Total tweets</title>
<style type="text/css">
/*
input {
float: left;
clear: both;
}
*/
@borndangerous
borndangerous / app.js
Created January 1, 2016 18:57 — forked from jmdobry/app.js
js-data + js-data-firebase + js-data-localstorage
var fb = new DSFirebaseAdapter({
basePath: 'https://my-app.firebase.io'
});
var ls = new DSLocalStorageAdapter();
var store = new JSData.DS({
// try firebase first, otherwise try offline data
fallbackAdapters: ['fb', 'ls'],
// After creating an item, sync it to localStorage
@borndangerous
borndangerous / hack.sh
Created December 30, 2015 06:49 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@borndangerous
borndangerous / stampery.json
Created December 14, 2015 08:24
Stampery Blockchain Example
{
"v": 3,
"data": {
"owners": [
{
"email": "dvdwlsh@gmail.com",
"name": "David Walsh"
}
],
"size": 3370311,
@borndangerous
borndangerous / JSON Tumblr Fun
Created November 15, 2015 21:05 — forked from xtkoeller/JSON Tumblr Fun
Tumblr JSON API
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript">
var globalTag = null;
var pageNum = null;
@borndangerous
borndangerous / gist:db3c2165ab1e654daba0
Created October 22, 2015 06:34 — forked from felixhageloh/gist:34645a899a0f22f583bb
Pure js widget for Übersicht
command: "echo Hello World!",
refreshFrequency: 5000,
render: function (output) {
return "<div><h1>" + output + "</h1></div>";
},
style: " \n\
top: 20px \n\
<link rel="import" href="../yt-video/yt-search-video.html">
<polymer-element name="my-element">
<template>
<style>
#yt_search_video {
width: 300px;
height: 300px;
left: 150px;
@borndangerous
borndangerous / 1 Specific Issue
Last active October 18, 2015 13:07
MindNode iOS 9 Crash Report
com.apple.UIKit.KeyboardManagement[144] <Notice>: HW kbd: Failed to set (null) as keyboard focus
SpringBoard(FrontBoard)[50] <Notice>: Application '<CFString 0x160f1c600 [0x1a16e8880]>{contents = "UIKitApplication:com.mindnode.mindnodetouch[0xfa8a]"}' <CFString 0x19e9e3ce0 [0x1a16e8880]>{contents = "crashed"}.
// Return array of string values, or NULL if CSV string not well formed.
function CSVtoArray(text) {
var re_valid = /^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/;
var re_value = /(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g;
// Return NULL if input string is not well formed CSV string.
if (!re_valid.test(text)) return null;
var a = []; // Initialize array to receive values.
text.replace(re_value, // "Walk" the string using replace with callback.
function(m0, m1, m2, m3) {
// Remove backslash from \' in single quoted values.