This file contains 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
// ==UserScript== | |
// @name Test Script 275457 | |
// @version 1 | |
// @include *example.com/* | |
// @grant GM.getResourceUrl | |
// @require https://greasemonkey.github.io/gm4-polyfill/gm4-polyfill.js | |
// @require https://raw.githubusercontent.com/lodash/lodash/4.17.5/dist/lodash.min.js | |
// @resource soundA https://raw.githubusercontent.com/KDE/oxygen/master/sounds/Oxygen-Im-Contact-In.ogg | |
// @resource soundB https://raw.githubusercontent.com/KDE/oxygen/master/sounds/Oxygen-Sys-Special.ogg | |
// ==/UserScript=== |
This file contains 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
class Queue { | |
constructor() { | |
this.storage = []; | |
} | |
enqueue(item) { | |
this.storage.push(item); | |
} | |
dequeue() { | |
return this.storage.shift(); | |
} |
This file contains 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
import Html exposing (text, div, button) | |
import Time exposing (every, second) | |
import Html.Events exposing (onClick) | |
incrementIf : Bool -> Int -> Int | |
incrementIf bool number = if bool then number + 1 else number | |
sample: Signal Bool | |
sample = | |
Signal.sampleOn (every second) isRunning.signal |