Skip to content

Instantly share code, notes, and snippets.

View wooorm's full-sized avatar
🇵🇸

Titus wooorm

🇵🇸
View GitHub Profile
@wooorm
wooorm / log.txt
Created February 21, 2024 11:23
Changes in the popular npm packages module formats between Nov 2023 to Feb 2024
Map(5) {
'cjs' => Map(3) {
'esm' => Set(34) {
'mime',
'eslint-plugin-jsdoc',
'@salesforce/sf-plugins-core',
'stylelint-prettier',
'@ckeditor/ckeditor5-core',
'@ckeditor/ckeditor5-upload',
'@ckeditor/ckeditor5-typing',
@wooorm
wooorm / example.js
Last active June 27, 2024 15:02
remark-abbr-start
import fs from "node:fs/promises";
import { unified } from "unified";
import remarkParse from "remark-parse";
import remarkRehype from "remark-rehype";
import rehypeStringify from "rehype-stringify";
import myCustomRemarkAbbrPlugin from "./index.js";
const file = await unified()
.use(remarkParse)
.use(myCustomRemarkAbbrPlugin)
@wooorm
wooorm / treebankTokenizer.js
Created January 19, 2014 12:58
Penn Treebank Tokenizer in JavaScript. Based on both the Sed script by Robert McIntyre ([cis.upenn.edu][1]), and the Python port by Edward Loper and Michael Heilman ([nltk.org][2]). [1]: http://www.cis.upenn.edu/~treebank/tokenizer.sed [2]: http://nltk.org/_modules/nltk/tokenize/treebank.html
/**
* Author: Titus Wormer <[email protected]>
* URL: http://wooorm.com/penn-treebank-tokenizer-in-javascript.html
*
* The Treebank tokenizer uses regular expressions to tokenize text as in
* Penn Treebank. This implementation is a based on both the Sed script
* written by Robert McIntyre (available at
* [http://www.cis.upenn.edu/~treebank/tokenizer.sed]), and the Python port
* by Edward Loper and Michael Heilman (available at
* [http://nltk.org/_modules/nltk/tokenize/treebank.html]).
@wooorm
wooorm / dabblet.css
Created September 29, 2013 14:41
Drop Cap using CSS Page Floats Module
p { margin: 0; }
.dropcap::first-letter {
float: left;
font-size: 10rem;
font-family: "Hoefler Text";
font-style: italic;
color: hsl(35, 97%, 54%);
/* Note: exclude-level is not supported anywhere yet. */
-webkit-exclude-level: 0.5;
@wooorm
wooorm / dabblet.css
Last active December 24, 2015 04:29
Drop Cap using CSS Shapes Module.
p { margin: 0; }
.dropcap::first-letter {
float: left;
font-size: 10rem;
font-family: "Hoefler Text";
font-style: italic;
/* Note, only supported in Safari 7 (on iOS, not on Mavericks) and the latest versions of Chrome Canary (behind the flag “Enable experimental Web Platform features”) */
-webkit-shape-outside: polygon(0 0, 80% 0%, 95% 12.5%, 103.5% 25%, 100.5% 37.5%, 85% 50%, 70% 62.5%, 25% 70%, 145% 75%, 160% 87.5%, 150% 93.75%, 110% 100%, 0 100.1%, 0 0);
shape-outside: polygon(0 0, 80% 0%, 95% 12.5%, 103.5% 25%, 100.5% 37.5%, 85% 50%, 70% 62.5%, 25% 70%, 145% 75%, 160% 87.5%, 150% 93.75%, 110% 100%, 0 100.1%, 0 0);
@wooorm
wooorm / dabblet.css
Created September 28, 2013 15:29
Dropcap: First Letter
.dropcap:first-letter {
float: left;
font-size: 3em;
line-height: 1;
margin-right: 0.125em;
}
@wooorm
wooorm / dabblet.css
Created September 28, 2013 15:23
Dropcap: Span Element
.dropcap {
float: left;
font-size: 3em;
line-height: 1;
margin-right: 0.125em;
}
@wooorm
wooorm / dabblet.css
Last active December 24, 2015 04:19
Dropcap: Image replacement using a background image
.dropcap {
background-image: url('http://dailydropcap.com/images/Q-9-cap.png');
float: left;
width: 87px;
height: 89px;
text-indent: 100%;
overflow: hidden;
}
@wooorm
wooorm / dabblet.html
Created September 28, 2013 13:10 — forked from anonymous/dabblet.html
Dropcap: Image replacement using an inline image.
<p><img src="http://dailydropcap.com/images/Q-9-cap.png" title="Daily Drop Cap by Jessica Hische" align="left" alt="Q"/>uisque ut felis sem. Quisque porttitor ante nulla, non pretium ligula ultricies sit amet. Donec commodo massa a felis fermentum, at porta nunc faucibus. Vestibulum sit amet diam aliquam, placerat dui ac, volutpat orci.</p>
<p>Integer euismod porttitor orci id ultrices. Donec fringilla augue eget nunc euismod, ac fermentum eros rhoncus. Aenean interdum pharetra quam, non mattis augue porta nec. Proin eu velit vel est gravida ullamcorper. Sed nec sem eu velit sollicitudin tincidunt non sit amet eros. Donec ut mauris cursus, rhoncus odio ac, vestibulum arcu. Morbi in pellentesque erat, in porttitor nibh. Pellentesque in vehicula elit. Sed tincidunt facilisis arcu, ut lobortis metus ultricies ut. Etiam accumsan feugiat nibh, at suscipit tellus porta id. Donec dapibus suscipit purus auctor pellentesque. Aenean id augue at neque scelerisque sagittis. In sed odio dapibus, ultrices justo quis, conva
@wooorm
wooorm / Gruntfile.coffee
Created April 7, 2013 13:42
Sample grunt-siml `Gruntfile.coffee`.
# Sample grunt-siml Gruntfile.coffee file
# https://github.com/wooorm/grunt-siml
module.exports = ( grunt ) ->
pkg = grunt.file.readJSON 'package.json'
grunt.config.init
'pkg' : pkg
'siml' :