Skip to content

Instantly share code, notes, and snippets.

@loveencounterflow
loveencounterflow / opera-mac-internal-pages-and-more.md
Created May 13, 2020 — forked from christopheranderton/opera-mac-internal-pages-and-more.md
A list of internal (and external) pages and useful information for macOS/OS X users (and others) of the Chromium/Blink based version of the web browser Opera.
@loveencounterflow
loveencounterflow / benchmarks-raw.coffee
Created Feb 23, 2020
JavaScript Performance Benchmarks: Looping with `for` and `yield`
View benchmarks-raw.coffee
'use strict'
############################################################################################################
log = console.log
warn = console.warn
fn = ( new Intl.NumberFormat 'en-US' ).format
@loveencounterflow
loveencounterflow / pg-error-fail-illegal-regex.sql
Last active Mar 22, 2018
Three Examples where PostgreSQL has Horrible Error Messages
View pg-error-fail-illegal-regex.sql
drop schema if exists X cascade;
create schema X;
create domain X.an_illegal_regex as text check ( value ~ '(' );
create table X.table_with_illegal_constraint (
a text,
constraint "column a must have a bogus value" check ( a::X.an_illegal_regex = a ) );
@loveencounterflow
loveencounterflow / Weird Chinese Characters
Last active Aug 12, 2016
Little excerpt from my CJK character collections
View Weird Chinese Characters
weird:
...-emoticon:
...-emoticon-frowning-face: 囧
...-emoticon-frowning-king: 崮
...-emoticon-frowning-queen: 莔
...-emoticon-frowning-withhat: 商
...-emoticon-frowning-turtle: 囧興
...-emoticon-bomberman: 卣
...-emoticon-verydull: 槑
...-arbitrary: 𠖬𠄓𠔇𦫺𦫷𦫻𠄑𠦑𠅂𢀗𠃟𨱘𠇬𥎨𠛷𠃡𡭡𡉵𠮸𠅑
@loveencounterflow
loveencounterflow / index.html
Last active Aug 29, 2015
Strange display error: Google Chrome (OSX) with Unicode CJK Unified Ideographs Extension B (but not C)
View index.html
<!DOCTYPE html><html>
<head>
<meta charset="utf-8">
<title>font-face-test</title>
<style>
@font-face {
font-family: 'cjk';
src: local('Sun-ExtA');
unicode-range: U+4e00-9fff;
@loveencounterflow
loveencounterflow / browser.coffee
Created Mar 13, 2015
Rendered pixels differ from nominal pixels
View browser.coffee
( $ 'document' ).ready ->
log = console.log.bind console
nominal_line_height = 25
line_count = 36
panel = $ '.panel'
cork = $ '.cork'
panel_rectangle = panel[ 0 ].getBoundingClientRect()
cork_rectangle = cork[ 0 ].getBoundingClientRect()
real_panel_height = panel_rectangle[ 'height' ]
real_cork_bottom = cork_rectangle[ 'bottom' ]
@loveencounterflow
loveencounterflow / fill-and-read-db.js
Last active Aug 29, 2015
`lte` key limits in LevelDB and Unicode
View fill-and-read-db.js
// Generated by CoffeeScript 1.8.0
(function() {
var $, D, db, db_route, feed, fs, gte, keys, log, new_db, read, rmrf, rpr, through2;
fs = require('fs');
log = console.log;
rpr = (require('util')).inspect;
View FROB-remarkable-extension.coffee
############################################################################################################
### % [ title ] ( src ) ###
video_matcher = /^%\[([^\]]*)\]\s*\(([^)]+)\)/
#-----------------------------------------------------------------------------------------------------------
parse_video = ( state, silent ) ->
return false if state.src[ state.pos ] isnt '%'
match = video_matcher.exec state.src[ state[ 'pos' ] .. ]
return false unless match?
unless silent
View names-en.txt
zero
one
two
three
four
five
six
seven
eight
nine
@loveencounterflow
loveencounterflow / test-stacktrace.coffee
Created May 7, 2013
**testing for interaction between longjohn, coffeenode-stacktrace, q, process.on 'uncaughtException' and coa**. test 1 runs as expected; event handler is called, longjohn optionally delivers long stacktrace, so q should be fine. but in test_2 (when called as ``coffee test-stacktrace f``), although longjohn manages to deliver long stacktrace, eve…
View test-stacktrace.coffee
# require 'coffeenode-stacktrace'
# require 'longjohn'
log = console.log
fs = require 'fs'
Q = require 'q'
coa = require 'coa' # https://github.com/veged/coa
process.on 'uncaughtException', ( error ) =>