Skip to content

Instantly share code, notes, and snippets.

@bayashi
bayashi / ai-web-bookmarklet.js
Last active November 7, 2026 23:25
AI Web UIで頻出する操作を便利にするブックマークレット
javascript:void(function(){var L=['US English','UK English','中国語','スペイン語','フランス語','ポルトガル語','ドイツ語','アラビア語','ヒンディー語','トルコ語','インドネシア語','韓国語'];var JP='\n```\n\n上記文章を\n丁寧でかつ親しみがあり、技術的な正確性をこわさず伝える ';var SFX=' に翻訳して1クリックでコピーできるようにして';var SVCS={perplexity:{q:'https://www.perplexity.ai/search/new?q=',home:'https://www.perplexity.ai/'},claude:{q:'https://claude.ai/new?q=',home:'https://claude.ai'},chatgpt:{q:'https://chatgpt.com/?prompt=',home:'https://chatgpt.com/'}};var ACTS={ja:'和訳して1クリックでコピーできるようにして',edit:'校正して',sum:'要約して',dia:'図解して',brk:'分解して補足説明して',vfy:'真偽検証して',md:'マークダウン形式に変換して'};function go(t,m){var q;if(m==='raw'){q=t;}else{var H='```\n'+t+'\n```\n\n上記の文章・内容を';q=ACTS[m]?H+ACTS[m]:'```\n'+t+JP+m+SFX;}var s=SVCS[svc.value]||SVCS.claude;var w=open(s.q+encodeURIComponent(q),'_blank');if(w)w.focus();}var M=/Mac/i.test(navigator.platform),mod=M?'⌘':'Ctrl',alt=M?'⌥':'Alt';var E=document.createElement.bind(document);var host=E('div');host.style.cssText='position:fixed;top:0;left:0;width:100%;height:100%;z-index:99999'
@bayashi
bayashi / gist:dd002cde2e8d958bd010929ea807d1c3
Last active April 12, 2026 00:19
Build AI prompt bookmarklet
javascript:void(function(){var L=['Spanish','Chinese','French','Portuguese','German','Arabic','Hindi','Turkish','Indonesian','Korean','Japanese'];var TPFX='\n```\n\nTranslate the above text into ';var TSFX=' in 3 patterns — polite, casual, and technical — and make it copyable with one click.';var SVCS={perplexity:{q:'https://www.perplexity.ai/search/new?q=',home:'https://www.perplexity.ai/'},claude:{q:'https://claude.ai/new?q=',home:'https://claude.ai'},chatgpt:{q:'https://chatgpt.com/?prompt=',home:'https://chatgpt.com/'}};var ACTS={en:'English and make it copyable with one click.',edit:'well-polished text',sum:'a summary',dia:'a diagram',brk:'a breakdown with notes',vfy:'a fact check',md:'Markdown'};function go(t,m){var q;if(m==='raw'){q=t;}else{var H='```\n'+t+'\n```\n\nConvert the above text into ';q=ACTS[m]?H+ACTS[m]:'```\n'+t+TPFX+m+TSFX;}var s=SVCS[svc.value]||SVCS.perplexity;var w=open(s.q+encodeURIComponent(q),'_blank');if(w)w.focus();}var M=/Mac/i.test(navigator.platform),mod=M?'⌘':'Ctrl',alt=M?'⌥':
@andyjack
andyjack / installing-net-ssleay-with-homebrew-openssl.md
Last active August 18, 2022 14:29
Installing Net::SSLeay with openssl from homebrew (OS X)

Installing Net::SSLeay with openssl from homebrew (macOS)

You don't need to do anything fancy other than running cpanm - with the most recent Net::SSLeay things should Just Work.

Updated 2020-Mar-10

I realized that since Net::SSLeay is looking in known places (including homebrew's install locations) for openssl, it means that my instructions that set up environment variables are no longer necessary! The following will install the module:

# openssl 1.0.2d
@lestrrat
lestrrat / gist:9104980
Last active August 3, 2017 21:55
ヘビメタ英語を日常で使う風景
# -*- mode: sh -*-
_cpanm() {
local cur prev
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]}
opt_bool=(--verbose --quiet --interactive --force --notest --test-only --sudo --installdeps --showdeps --reinstall --mirror-only --prompt --self-contained --self-upgrade --version --dev
--with-all-features --with-develop --without-develop --pp --pureperl