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
| // inst: unix epoch | |
| const hist = { | |
| "channel1": [ | |
| { inst: 10000, id: "a" }, | |
| { inst: 20000, id: "b" }, | |
| { inst: 30000, id: "c" }, | |
| { inst: 30000, id: "d" }, | |
| { inst: 40000, id: "e" } | |
| ] | |
| }; |
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
| const curry = (fn, ...oldArgs) => (...newArgs) => { | |
| const args = [...oldArgs, ...newArgs]; | |
| return (args.length < fn.length) ? curry(fn, ...args) : fn(...args); | |
| }; |
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
| const compose = (...args) => initial => args.reduceRight( | |
| (result, fn) => fn(result), | |
| initial | |
| ); |
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
| set -e | |
| # fw_type will always be developer for Mario. | |
| # Alex and ZGB need the developer BIOS installed though. | |
| fw_type="`crossystem mainfw_type`" | |
| if [ ! "$fw_type" = "developer" ] | |
| then | |
| echo -e "\nYou're Chromebook is not running a developer BIOS!" | |
| echo -e "You need to run:" | |
| echo -e "" |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>{{ title }}</title> | |
| <link href="./app.min.css" rel="stylesheet"> | |
| <script src="./app.min.js" defer></script> |
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 keys = ["foo", "bar", "baz"]; | |
| object = keys.reduce(function (partialObject, key) { | |
| partialObject[key] = 1; | |
| return partialObject; | |
| }, {}); | |
| //=> { foo: 1, bar: 1, baz: 1 } |
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
| /** | |
| * Extract whatever comes after the last '.' in a string. | |
| * | |
| * @param {string} string - input path/URL | |
| * @return {string} chars after last '.', else `undefined`. | |
| */ | |
| var extractExtension = function (string) { | |
| var ext = string.match(/\.[0-9a-z]+$/i); | |
| if (ext && ext[0]) { | |
| return ext[0].replace('.', '').toLowerCase(); |
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
| /*! HYDRO 1.0.0 (2014-10-27) | (c) 2014 hydroweb.co.nz */ | |
| Array.prototype.forEach || (Array.prototype.forEach = function(a, b) { | |
| var c, d; | |
| if (null == this) throw new TypeError(" this is null or not defined"); | |
| var e = Object(this), | |
| f = e.length >>> 0; | |
| if ("function" != typeof a) throw new TypeError(a + " is not a function"); | |
| for (arguments.length > 1 && (c = b), d = 0; f > d;) { | |
| var g; | |
| d in e && (g = e[d], a.call(c, g, d, e)), d++ |
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
| # This file has been auto-generated by i3-config-wizard(1). | |
| # It will not be overwritten, so edit it as you like. | |
| # | |
| # Should you change your keyboard layout some time, delete | |
| # this file and re-run i3-config-wizard(1). | |
| # | |
| # i3 config file (v4) | |
| # | |
| # Please see http://i3wm.org/docs/userguide.html for a complete reference! |
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
| # nvidia-xconfig: X configuration file generated by nvidia-xconfig | |
| # nvidia-xconfig: version 331.113 (buildmeister@swio-display-x64-rhel04-03) Mon Dec 1 21:15:34 PST 2014 | |
| Section "ServerLayout" | |
| Identifier "Layout0" | |
| Screen 0 "Screen0" #0 0 | |
| #Option "Xinerama" "0" | |
| #InputDevice "Keyboard0" "CoreKeyboard" | |
| InputDevice "Mouse0" "CorePointer" | |
| EndSection |