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
// ==UserScript== | |
// @name hack.chat emoji support | |
// @namespace A4 | |
// @version 0.1.0 | |
// @description Causes ASCII emoji shorthand of the form :shrug: to be | |
// rerendered as an associated emoji character(s) | |
// @author A4 | |
// @match https://hack.chat/?* | |
// @grant GM_addStyle | |
// ==/UserScript== |
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 Trie(valueCons, hasValue=false) { | |
"use strict"; | |
const constructorFailure = new TypeError( | |
"Tries must be initialized with a valid constructor " + | |
"of an iterable type as the first argument." | |
); | |
if (typeof valueCons !== "function") { | |
throw constructorFailure; |
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 lang="en"> | |
<head> | |
<title>Linux-compatible multiplayer games that don't suck</title> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> |
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 lang="en"> | |
<head> | |
<title>Linux-compatible multiplayer games that don't suck</title> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> |
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
extern crate libc; | |
#[macro_use] | |
extern crate lazy_static; | |
use std::sync::Mutex; | |
use std::vec::Vec; | |
lazy_static! { | |
static ref BUFFER: Mutex<Vec<i32>> = Mutex::new(Vec::with_capacity(8)); |
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
/** | |
* Creates a new `CircularBuffer` with the specified `capacity`, | |
* which must strictly be a positive integer. | |
* | |
* We here use the term "zero element", which refers to exactly `null` if the | |
* `CircularBuffer` is backed by an `Array`, and refers to exactly `0` if it is | |
* backed by a `TypedArray`. Note that using this constructor will always yield | |
* a `CircularBuffer` backed by an `Array`. Use the | |
* `CircularBuffer.fromArray()` function any time a `TypedArray` backing is | |
* required. |
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
/** | |
* Decides if the given rectangle contains the given point within it. | |
* | |
* The rectangle is specified by the x-value of the upper-left corner, then the | |
* y-value, then the width, and then the height, in that order. After that, the | |
* point whose containment or non-containment is to be determined is specified. | |
* These values can each be specified either as two separate `number`s or as a | |
* single `V2`, mixing and matching arbitrarily. | |
* | |
* @return {boolean} |
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
/** | |
* Creates a new `Rect` with the specified top-left corner, width, and height. | |
* These quantities can be specified in three different ways: | |
* | |
* - Four arguments, all `numbers`, specifying the x and y values of the | |
* top-left corner and width/height, respectively. | |
* - Two arguments, both `V2`s. | |
* - One argument, a single `Rect` to be cloned. | |
* | |
* @param {number | V2 | Rect} arg1 |
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
-- | what | |
applyInputs :: PlayerState -> PlayerState | |
applyInputs ps = | |
foldl' (\ps' inputGroup -> | |
-- Calculate accelerations for this frame based on input log. | |
let (# v, pressed, _, t_ #) = foldl' (\(# v, pressed, t0', t_ #) inp -> | |
let t1 = inp^.timeStamp | |
down = inp^.isDown | |
in (# case t0' of | |
Just t0 -> let thisDt = t1 - t0 in |
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
Format | |
====== | |
Band name | |
Album name 1 (release year) | |
Genre(s) | |
Choice song(s) from this album | |
Album name 2 (release year) | |
Genre(s) | |
Choice song(s) from this album |
OlderNewer