Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| // 窓の杜のトップページにて、開発者コンソールに以下の内容をコピペして実行 | |
| // URLリストをNotebookLMなどに貼り付けて概要を得たいときなどに便利 | |
| console.log([...new Set(Array.from(document.querySelectorAll("#daily-block-0 li a")).map(a => a.href).filter(url => url.endsWith(".html")))].join("\n")); |
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 NOTION_API_URL = "https://api.notion.com/v1/"; | |
| function doGet(e) { | |
| return ContentService.createTextOutput("It works!"); | |
| } | |
| function doPost(e) { | |
| const payload = JSON.parse(e.postData.contents); | |
| const pageId = payload.data?.id || payload.pageId; | |
| const title = payload.data.properties["名前"].title[0].plain_text; |
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
| <# | |
| .SYNOPSIS | |
| ファイルダンプを表示する | |
| .PARAMETER FilePath | |
| 読み込むファイル名 | |
| .PARAMETER Length | |
| 読み込むバイト数。省略時16バイト。-1を指定するとファイル全体を読み込み可能 | |
| #> | |
| function Get-Dump{ | |
| param ( |
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
| function doPost(e) { | |
| try { | |
| const raw = e.postData.contents; | |
| Logger.log("受信データ: " + raw); | |
| console.log("受信データ: " + raw); | |
| const json = JSON.parse(raw); | |
| // キャプション: 名前プロパティ | |
| const caption = json.data.properties["名前"].title[0].plain_text; |
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
| # 2-space indent | |
| param( | |
| [string]$DownloadPath = "$env:USERPROFILE\Downloads" | |
| ) | |
| # 変換テーブル: 拡張子 → 出力拡張子 + ffmpeg 追加引数 | |
| $targets = @{ | |
| '.wav' = @{ Out = 'mp3'; Extra = @() } | |
| '.webm' = @{ Out = 'mp4'; Extra = @('-c:v','copy','-c:a','aac') } | |
| } |
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
| javascript:(() => { | |
| function wrapTextWithLineBreaks(text, maxLen = 50, forceBreakLen = 60) { | |
| let result = '', currentLine = ''; | |
| for (let char of text) { | |
| currentLine += char; | |
| if (currentLine.length >= maxLen && /[。!?]/.test(char)) { | |
| result += currentLine.trim() + '\n'; currentLine = ''; | |
| } else if (currentLine.length >= forceBreakLen) { | |
| result += currentLine.trim() + '\n'; currentLine = ''; | |
| } |
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
| { | |
| let event = []; | |
| Array.from(document.querySelectorAll(".fc-event-container")).forEach((e) => { | |
| event.push({ | |
| "date": e.querySelector(".screen-reader-text").innerText, | |
| "title": e.querySelector(".fc-title").innerText, | |
| "url": e.querySelector("a").href | |
| }); | |
| }); | |
| event.forEach(e => console.log(`${e.date}:${e.title}( ${e.url} )`)); |
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
| # prompt: 変数input_textの内容をMarkdown形式のテキストと見なし、以下の処理を行う | |
| # * 見出しのレベルを2下げる | |
| # * URL参照のラベル部は破棄し、次の形式に変更する[<URL>:embed:cite] | |
| import re | |
| import ipywidgets as widgets | |
| from IPython.display import display, Javascript | |
| def process_markdown(markdown_text): | |
| # 見出しレベルを2下げる |
NewerOlder