This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * How to query a sqlite3 database through Arduino Yun | |
| * | |
| * The ability to share a database between Linux Linino | |
| * and the arduino board opens endless possibilities | |
| * in terms of interoperability between these two platforms. | |
| * | |
| * This sketch shows an example through the console | |
| * The output could be used for other goals too. | |
| * Tested over WiFi, use Serial instead of Console for USB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| try{new CustomEvent('?')}catch(o_O){ | |
| /*!(C) Andrea Giammarchi -- WTFPL License*/ | |
| this.CustomEvent = function( | |
| eventName, | |
| defaultInitDict | |
| ){ | |
| // the infamous substitute | |
| function CustomEvent(type, eventInitDict) { | |
| var event = document.createEvent(eventName); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var utils = (function (Object) { | |
| 'use strict'; | |
| var | |
| ObjectPrototype = Object.prototype, | |
| ArrayPrototype = Array.prototype, | |
| call = Object.call, | |
| utils = {}; | |
| function bind(name) { | |
| if (typeof this[name] === 'function') { | |
| utils[name] = call.bind(call, this[name]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var SCROLLBAR_SIZE = SCROLLBAR_SIZE || function(d){ | |
| var | |
| e = d.documentElement, | |
| p = d.createElement('p'), | |
| r | |
| ; | |
| p.style.cssText = [ | |
| ';position:absolute', | |
| ';margin:0', | |
| ';padding:0', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // @example | |
| // var split = lazySplit( | |
| // 'a.\nb.c', | |
| // /\.(?:[\n\r]*?)?/g | |
| // ); | |
| function* lazySplit(str, re) { | |
| for (var | |
| i = 0; | |
| re.test(str); | |
| i = re.lastIndex |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var typeOf = (function(Object, RegExp){ | |
| // WTFPL License - http://en.wikipedia.org/wiki/WTFPL | |
| // thanks to @jdalton and @ljharb | |
| var toString = Object.prototype.toString, | |
| cache = (Object.create || Object)(null); | |
| return function typeOf(Unknown) { | |
| var asString = typeof Unknown; | |
| return asString == 'object' ? ( | |
| Unknown === null ? 'null' : ( | |
| cache[asString = toString.call(Unknown)] || ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function(){ | |
| var | |
| // to include old IEs no 1-9 or 0-9 range as first char allowed | |
| SIMPLE_PROPERTY_NAME = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/, | |
| // the right global to pollute | |
| G = typeof global === typeof G ? window : global, | |
| // shortcut for Function composition | |
| F = G.Function, | |
| // shortcut for common Array stuff |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /o/.toJSON || (RegExp.prototype.toJSON = function () { | |
| return [ | |
| this.source, | |
| (this.global ? "g" : "") + | |
| (this.ignoreCase ? "i" : "") + | |
| (this.multiline ? "m" : "") | |
| ]; | |
| }); | |
| var re = /test/g; | |
| alert(RegExp.apply(null, JSON.parse(JSON.stringify(re)))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| systemctl disable dhcpcd@eth0.service | |
| # vi /etc/systemd/system/network.service | |
| # IP=192.168.1.2/24 | |
| # RT=192.168.1.254 | |
| [Unit] | |
| Description=Static Connectivity | |
| Wants=network.target | |
| Before=network.target | |
| BindsTo=sys-subsystem-net-devices-eth0.device |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ========================================== | |
| // Copyright 2013 Twitter, Inc | |
| // Licensed under The MIT License | |
| // http://opensource.org/licenses/MIT | |
| // ========================================== | |
| // PROTOTYPE --- WON'T WORK, DON'T USE YET, WAIT FOR IT | |
| define(function (require) { | |
| 'use strict'; |