URL | font-family |
---|---|
http://google.co.jp | arial, sans-serif |
http://yahoo.co.jp | "MS PGothic", Arial, "Hiragino Kaku Gothic ProN", Osaka, sans-serif |
http://amazon.co.jp | Arial, sans-serif |
http://livedoor.jp | "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "Meiryo UI", メイリオ, Meiryo, "MS Pゴシック", Arial, sans-serif |
http://rakuten.co.jp | Meiryo, "Hiragino Kaku Gothic ProN", "MS PGothic", sans-serif |
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
const { exec } = require('child_process') | |
const esbuildFigmaRunLastPlugin = { | |
name: 'figma-run-last-plugin', | |
setup: async function () { | |
await new Promise(function (resolve, reject) { | |
exec( | |
`osascript <<'EOF' | |
if application "Figma" is running then | |
tell application "Figma" |
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
tell application "System Events" | |
tell process "Figma" | |
set frontmost to true | |
click menu item "Run last plugin" of menu "Plugins" of menu bar 1 | |
end tell | |
end tell |
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
$ node index.js | |
ternary, true x 84,415,848 ops/sec ±2.47% (78 runs sampled) | |
ternary, false x 73,646,719 ops/sec ±5.86% (73 runs sampled) | |
&& and ||, true x 78,748,665 ops/sec ±2.80% (72 runs sampled) | |
&& and ||, false x 80,837,863 ops/sec ±1.84% (81 runs sampled) | |
Fastest is ternary, true |
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
functional | |
stateless | |
immutable | |
composable | |
flat | |
simple | |
data | |
serializable |
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
var Polyglot = require('node-polyglot'); | |
var phrases = { | |
x: 'foo', | |
y: '%{smart_count} bar |||| %{smart_count} bars' | |
}; | |
var p = new Polyglot({ | |
locale: 'en', | |
phrases: phrases |
NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
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
/*! normalize-all-you-really-need-tho.css v1.0.0 | MIT License */ | |
html { | |
font-family: sans-serif; /* 1 */ | |
-webkit-text-size-adjust: 100%; /* 2 */ | |
-ms-text-size-adjust: 100%; /* 2 */ | |
} | |
body { | |
margin: 0; |
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
/** | |
* Simple node.js style script loader for modern browsers | |
**/ | |
function loadScript(src, cb) { | |
var script = document.createElement('script'); | |
script.async = true; | |
script.src = src; | |
script.onerror = function() { | |
cb(new Error("Failed to load" + src)); |
NewerOlder