Skip to content

Instantly share code, notes, and snippets.

@ryonakae
ryonakae / tailwind.config.ts
Last active December 22, 2023 03:38
Tailwind CSSのデフォルトの変数をほぼ全て削除して、なるべくArbitrary valuesを使うためのtailwind.config
import type { Config } from 'tailwindcss'
const config: Config = {
content: ['./src/**/*.{js,ts,jsx,tsx,mdx}'],
theme: {
// Common
colors: {
'[]': '[]',
inherit: 'inherit',
transparent: 'transparent',
@ryonakae
ryonakae / AppleScript
Last active March 26, 2024 07:58
MacのAutomatorを使ってGoogle Chromeのユーザープロファイル別のショートカットを作る方法
tell application "Google Chrome" to activate
tell application "System Events"
tell process "Google Chrome"
click menu item "プロファイル名" of menu 1 of menu bar item "プロファイル" of menu bar 1
end tell
end tell
@ryonakae
ryonakae / underline_all_hyperlinked_text.ts
Last active September 18, 2024 01:28
FigmaのRun Plugin APIプラグインで使える便利なコードスニペット集
// 現在のページにあるハイパーリンクが設定されているすべてのテキストに下線を引く
function main() {
const textNodes: TextNode[] = figma.currentPage.findAll(node => {
return node.type === 'TEXT' && node.hyperlink !== null
})
textNodes.forEach(async textNode => {
await Promise.all(textNode.getRangeAllFontNames(0, textNode.characters.length).map(figma.loadFontAsync))
textNode.textDecoration = 'UNDERLINE'
})