Skip to content

Instantly share code, notes, and snippets.

@kujirahand
kujirahand / exec-rhino
Last active August 29, 2015 13:56
Rhino/JavaScriptをMacアプリに仕上げる方法 ref: http://qiita.com/kujirahand/items/5a327970e0d0b60be14a
on main(input)
-- スクリプトの名前
set mainScript to "test.sh"
-- 親ディレクトリの取得
tell application "Finder" to set parentDirPos to parent of (path to me) as text
set parentDir to ((alias parentDirPos)'s POSIX path)
try
do shell script "cd " & parentDir & ";./" & mainScript & space & input
end try
end main
<!DOCTYPE html><html><meta charset="utf-8"><body>
<!-- 入力と出力のテキストボックスを作る -->
<h3>入力 - 以下にタイトルとURLの一覧を貼り付け</h3>
<textarea id="in_ta" rows="8" cols="80">
オンライン結婚式場見学を開始したノバレーゼの成約に向けた取組
https://news.mynavi.jp/article/20200619-1056453/
Windows 10にUbuntu 20.04 LTSをインストールする
https://news.mynavi.jp/article/liunx_win-51/
ノートPCと周辺機器の連係が一気に楽になる「ドッキングステーション」
https://news.mynavi.jp/kikaku/beginner_pc-3/
<!DOCTYPE html><html><meta charset="utf-8"><body>
<style>
textarea {
font-family: "Courier New", Consolas, monospace;
background-color: #f0ffff;
}
</style>
<!-- 入力と出力のテキストボックスを作る -->
<h3>入力 - 以下にタイトルとURLの一覧を貼り付け</h3>
<textarea id="in_ta" rows="8" cols="80">
@kujirahand
kujirahand / data.csv
Created July 9, 2020 01:49
2010年から10年分の日別平均気温・最高気温のCSVファイル
年月日 平均気温(℃) 最高気温(℃)
2010/1/1 4.8 9.5
2010/1/2 6.3 11.4
2010/1/3 5.7 9.2
2010/1/4 6.5 9.6
2010/1/5 7.3 13.2
2010/1/6 6.5 10.4
2010/1/7 7.3 12.1
2010/1/8 7.6 11.3
2010/1/9 7.2 11.1
@kujirahand
kujirahand / setup-echo-server.sh
Last active May 21, 2021 14:13
ColabになでしこWebSocket Echoサーバーを構築するコマンド
#!/bin/bash
# ColabになでしこWebSocketサーバを自動構築するスクリプト
# Colab
# [URL] https://colab.research.google.com/
# 以下のコマンドをColabで実行してください。
# => !curl "https://n3s.nadesi.com/index.php?action=plain&page=546" > setup.sh && /bin/bash ./setup.sh
echo "なでしこをインストールしています"
npm install -g nadesiko3
npm install nadesiko3-websocket
@kujirahand
kujirahand / idea2.html
Created August 16, 2021 11:45
3×3のグリッドのアイデア発想ツール 改良版
<!DOCTYPE html><meta charset="utf-8"><html><body>
<!-- UIを作成 -->
<div id="g"></div>
<p style="clear:both"></p>
<p><a id="save" download="idea.txt" href="#">保存</a></p>
<!-- JavaScript -->
<script>
// 3×3のグリッドを作成
const g = document.querySelector('#g')
const items = []
@kujirahand
kujirahand / idea.html
Last active September 1, 2021 14:56
3×3グリッドのアイデア発想ツール
<!DOCTYPE html><meta charset="utf-8"><html><body>
<!-- UIを作成 -->
<div id="g"></div>
<p style="clear:both"></p>
<p><a id="save" download="idea.txt" href="#">保存</a></p>
<!-- JavaScript -->
<script>
// 3×3のグリッドを作成 --- (*1)
const g = document.querySelector('#g')
const items = []
@kujirahand
kujirahand / parser.go.y
Last active January 25, 2022 01:29
複数行の計算、および、変数代入の機能がある最小計算言語
%{
// プログラムのヘッダを指定
package main
import (
"os"
"fmt"
"strconv"
"bufio"
)
%}
package main
import (
"bytes"
"encoding/binary"
"io"
"io/ioutil"
)
// 手軽にnバイト読み込む関数を定義
@kujirahand
kujirahand / hayamihyou.txt
Created April 29, 2022 09:46
年齢早見表を自動作成/Power Automate Desktop
DateTime.GetCurrentDateTime.Local DateTimeFormat: DateTime.DateTimeFormat.DateAndTime CurrentDateTime=> CurrentDateTime
Text.ConvertDateTimeToText.FromCustomDateTime DateTime: CurrentDateTime CustomFormat: $'''yyyy''' Result=> yyyy
Excel.LaunchExcel.LaunchUnderExistingProcess Visible: True Instance=> ExcelInstance
LOOP LoopIndex FROM 1 TO 50 STEP 1
Excel.WriteToExcel.WriteCell Instance: ExcelInstance Value: $'''%yyyy - LoopIndex + 1%年''' Column: 1 Row: LoopIndex
Excel.WriteToExcel.WriteCell Instance: ExcelInstance Value: $'''満 %LoopIndex - 1% 歳''' Column: 2 Row: LoopIndex
END
Folder.GetSpecialFolder SpecialFolder: Folder.SpecialFolder.DesktopDirectory SpecialFolderPath=> SpecialFolderPath
Excel.CloseExcel.CloseAndSaveAs Instance: ExcelInstance DocumentFormat: Excel.ExcelFormat.FromExtension DocumentPath: $'''%SpecialFolderPath%\\年齢早見表.xlsx'''