These files goes into your user profile folder, which can be found at about:profiles
.
The user.js
file goes into the root of the profile directory, and userChrome.css
and userContent.css
goes into a subfolder called chrome
.
# MySQL: convert GUID (Microsoft-style UUID) to BINARY(16) | |
# '11223344-5566-7788-9900-AABBCCDDEEFF' → 0x44332211665588779900AABBCCDDEEFF | |
# usage: CREATE TABLE example(id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, guid BINARY(16) NOT NULL UNIQUE); | |
# INSERT INTO example(guid) VALUES (uuid_to_bin(UUID())); | |
CREATE FUNCTION uuid_to_bin(s CHAR(36)) | |
RETURNS binary(16) | |
DETERMINISTIC | |
RETURN UNHEX(CONCAT( | |
SUBSTRING(s,7,2),SUBSTRING(s,5,2),SUBSTRING(s,3,2),SUBSTRING(s,1,2), |
# MySQL: convert BINARY(16) to GUID (Microsoft-style UUID) | |
# 0x11223344556677889900AABBCCDDEEFF → '44332211-6655-8877-9900-AABBCCDDEEFF' | |
# usage: CREATE TABLE example(id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, guid BINARY(16) NOT NULL UNIQUE); | |
# SELECT id, uuid_from_bin(guid) FROM example; | |
CREATE FUNCTION uuid_from_bin(b BINARY(16)) | |
RETURNS char(36) CHARSET utf8 | |
DETERMINISTIC | |
BEGIN | |
DECLARE h CHAR(32); |
{ | |
"definitions": {}, | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"$id": "http://onlyhuman.dk/json-schema/.mocharc.json", | |
"type": "object", | |
"title": "The Root Schema", | |
"properties": { | |
"diff": { | |
"$id": "#/properties/diff", | |
"type": "boolean", |
/** | |
* Removes ReadOnly from all properties on an interface. | |
*/ | |
type Mutable<T> = { | |
-readonly [P in keyof T]: T[P] extends ReadonlyArray<infer U> ? Mutable<U>[] : Mutable<T[P]> | |
}; |
/** | |
* Reads a object at runtime and serializes it into metadata. | |
* Need serious improvements, but does some of the work. | |
* @returns metadata. | |
* @returns typescript definition text. | |
*/ | |
function (targetvar){ | |
// TODO: Find a way to recognize a class from a function. | |
// TODO: Find out how to detect arrays (should be easy). | |
// TODO: Create separate interfaces instead of a nested interface. |
<# | |
.Synopsis | |
Reads a file, and beeps on 0 or 1. | |
.Description | |
Reads a textfile, beeps once for every 0 and twice for 1 it finds in the text. | |
.Parameter Path | |
The file to read | |
.Inputs | |
System.IO.FileInfo | |
.Example |
interface Disposable { | |
dispose(): void; | |
} | |
function using<T extends Disposable>(instance: T, fn: (instance: T) => any) { | |
try { | |
fn(instance); | |
} finally { | |
instance.dispose(); | |
} | |
} |
<Query Kind="Program"> | |
<NuGetReference>Newtonsoft.Json</NuGetReference> | |
<Namespace>Newtonsoft.Json</Namespace> | |
<Namespace>System.Globalization</Namespace> | |
</Query> | |
void Main() | |
{ | |
// Write code to test your extensions here. Press F5 to compile and run. | |
} |
These files goes into your user profile folder, which can be found at about:profiles
.
The user.js
file goes into the root of the profile directory, and userChrome.css
and userContent.css
goes into a subfolder called chrome
.
DELIMITER | | |
CREATE FUNCTION uuid_from_bin(b BINARY(16)) | |
RETURNS CHAR(36) DETERMINISTIC | |
BEGIN | |
DECLARE hex CHAR(32); | |
SET hex = HEX(b); | |
RETURN CONCAT(LEFT(hex, 8), '-', MID(hex, 9,4), '-', MID(hex, 13,4), '-', MID(hex, 17,4), '-', RIGHT(hex, 12)); | |
END | |
| |