「command」を含む日記 RSS

はてなキーワード: commandとは

2026-04-17

[]エリートパニック

エリートパニック」(elite panic)とは、災害危機が発生した際に、権力を持つエリート層(政府行政企業上層部など) が「一般の人々がパニックを起こすに違いない」と過剰に恐れ、それ自体パニック状態に陥ってしま現象を指します。定義と特徴エリート層は、社会秩序崩壊大衆暴走を極度に懸念します。

その結果、情報隠蔽、遅延、強権的な統制、過剰な「命令・統制」(command and control)重視の対応を取ってしまう。

皮肉なことに、一般市民災害時に意外と冷静で、互いに助け合う「災害ユートピア」のような協力行動を示すことが多い一方、エリート側のこの過剰反応こそが、被害を拡大させたり、信頼を失わせたりする大きな要因になると指摘されています

imidas.jp

この概念は、米国災害社会学者キャスリーン・ティアニーや、リークラークカロンチェスらによって議論され、レベッカ・ソルニットの著書『災害ユートピア』(原題: A Paradise Built in Hell)で広く紹介されました。同書では、歴史的災害事例を通じて、普通の人々連帯する姿と、エリート側の恐怖心による誤った対応を対比的に描いています。なぜ起こるのか?エリート層は、自分たち権力正当性が、社会の混乱によって脅かされることを恐れます。具体的には:社会的混乱への恐怖

貧困層マイノリティ移民などへの偏見的な懸念

略奪や無秩序イメージ強迫観念

これが「パニック神話」(災害時に大衆が必ずパニックになるという誤った思い込み)を生み、情報開示をためらわせるのです。結果として、エリート自身パニックに陥り、状況を悪化させるという自己成就予言のような状態になります

en.wikipedia.org

具体例スリーマイル島原子力事故1979年):住民パニックを起こすのを恐れた当局が、原子炉危険性を十分に伝えず、避難指示が遅れた。

ハリケーンカトリーナ2005年):被災地での軍事的・強権的な対応が優先され、救援が遅れた。

東日本大震災福島原発事故SPEEDI放射能拡散予測情報)の公開が遅れ、住民避難に混乱が生じた事例が、エリートパニック典型として挙げられます

その他、1906年サンフランシスコ地震での「略奪者」への射殺命令など、歴史的に繰り返されてきたパターンです。

災害社会学の研究では、実際の災害現場で「大衆パニック」はほとんど確認されておらず、むしろエリート側の対応問題の核心だとされています最近文脈での使用日本では、災害時だけでなく、危機的な社会状況(例: 供給不足、感染症パンデミックなど)で「情報統制」や「不安を煽るな」という姿勢が、エリートパニックの表れとして批判的に使われることがあります一般市民情報を与えられれば冷静に対応できるのに、隠すことでかえって不信や混乱を招く、という指摘です。要するに、エリートパニックは「権力者こそがパニックを起こしやすく、それが社会全体に悪影響を及ぼす」という逆説的な洞察です。危機時には、透明性の高い情報共有と、市民自発的な協力力を信じることが重要、という教訓を含んでいます。この概念を知ると、ニュース行政対応を少し違う視点で見られるようになるかもしれません。関連する本として、ソルニットの『災害ユートピア』をおすすめします。

2026-04-10

anond:20260410213559

Commandは性能よかったけど、自前のPCじゃ性能足らんかった

ぎり70BならRAM使いつつ動かせたんだけど、1-2Token/sだし、こんなの使うくらいならgeminiかgpt脱獄してた気がする

いやー、ほんまに頭良くなったら表現の幅狭まったね

とにかく、複雑でぐちゃぐちゃに要素詰め込んだプロンプト使えば楽しめるかもしれない

anond:20260410202242

なるほど?Llama、Mistral、Commandの3つが目立って存在してたとき、少しだけ触って違いあんまりからないなぐらいだったけど(Command制限ゆるい?ぐらい)、Mistralか…

クリエイティブさについてはエージェント用途での性能を上げるために割と仕方ないんだろうね。Claude Opusの3.6と3.5だけ見ても3.5のほうが書き物の感触良いなと思う

2025-12-28

anond:20251228130836

前の増田追記したんだゴメンね

だれがってズバリCopilotがだけど・・・

  • Ctrl + Alt + V → V → Enter

MacCommand+Shift+V に近い「形式選択して貼り付け」方式

anond:20251228124352

Commandなんてキーは無いんだが・・・

WindowsではCtrlが大体Command役割だがCtrl+Shift+Vでは何も反応しない

anond:20251228114806

Command+Shift+Vで普通にできるけど?

Excelいじる前にコピペ方法学んだ方がよくね?





追記

WindowsでもM365のExcelでCtrl+Shift+Vで普通にできるけど?

macOScommand + option + shift + V という書式なしペースト用のグローバルショートカットがあるからこそなせる技...。Windowsにはそんなのがないから、独自実装アプリをのぞいてわざわざメニューからやらないといけない。

https://b.hatena.ne.jp/entry/4780957157075880833/comment/portal18

2025-11-23

anond:20210113162419

BBCロシア駐在員 Steve Rosenberg が、ロシア新聞名前だけめちゃくちゃロシア語で発音するの好きなんだよなぁ

What messages was Vladimir Putin sending from a command post? And who to?

https://www.youtube.com/watch?v=jvrxPAmrvp0

2025-11-18

anond:20251118131834

Decapitation is a military strategy aimed at removing the leadership or command and control of a hostile government or group.

斬首作戦(Decapitation)とは、敵対する政府または集団指導部や指揮統制(command and control)を除去することを目的とした軍事戦略である

https://en.wikipedia.org/wiki/Decapitation_(military_strategy)

2025-11-17

anond:20251117111105

Alt+Tabアプリフォーカス切り替えるのと同等のことをしたいんだがどうやるの?

アプリ切り替えるんだったらCommand+Tabでできるよ

Window単位の切り替えができるツールもあるけど、それよりもMission Control使ったほうがスマートだと思うよ

anond:20251117111105

いきなりMacだけ支給はつらいよね…。ポイントだけサクッと。

[1] Alt+Tab 相当(アプリ切り替え)

アプリ間の切り替え

Windows: Alt + Tab

Mac: command(⌘) + tab

command押しっぱなしで tabトントンすると順送り、

command + shift + tab で逆順です。

・同じアプリ内でウィンドウを切り替えたいとき

Mac: command(⌘) + `(数字の1の左にあるキー

・全部見たいときMission Control

Mac: control + ↑

アプリごとのウィンドウだけ見たい場合は control + ↓

この3つ覚えれば、とりあえず Alt+Tab 周りのストレスはかなり減るはず。

[2] Ctrl+Backspace で ATOK の変換結果を Undo したい

Windows だと

「確定をやめて入力中に戻す」= Ctrl + Backspace

デフォルトですよね。

ATOK for Mac だと同じ機能

control + delete

です。

atok.com

  1. 1

Macの「deleteキーは、Windowsでいう Backspace(左側を消すキー)なので、

MacBookキーボードなら「control を押しながら delete」でOKです。

・注意点

確定直後じゃないと効かない(間にカーソルを動かしたり別の文字を打つとNG

atok.com

効かないアプリもたまにある(ATOK公式もそう書いてます)。

もし効きが悪かったら、

メニューバーの「あ」/「A」アイコンATOKメニュー環境設定 → 「キーローマ字カスタマイザ」

から「確定のアンドゥ」の割り当てキー確認・変更できます

atok.com

  1. 1

[3] 「WinでできてMacでできない」問題がつらいときの小技

ざっくり挙げると、

ウィンドウ最大化が弱い → 「control + command + F」でフルスクリーン

Windows風のショートカットに寄せたい → Karabiner-Elementsキー入れ替え

ウィンドウスナップWin+矢印)欲しい → Rectangle みたいな無料アプリを入れる

あたりを入れておくと、かなり「Windows脳」でも生きやすくなります

とりあえず、

command + tab

command + `

control + delete

この3つだけ、まず指に覚えさせるのがおすすめ

他に「これだけはWinと同じ感覚でやりたい!」ってやつがあれば、具体的に書いてくれたらショートカットか設定探すよ。

2025-09-04

anond:20250904054611

・「凍結・解凍」は日本ではLHAが使ってた(確かっぽい)

かに使ってた。使ってはいるけど解凍を使ってるのは自己解凍のところだけで、e,xオプションのところでは「ファイルを取り出す」表記。凍結表記もaオプションのところだけ。

(LHAになる前のバージョンだけど)LHarcソースコード内の日本語版の使い方

char use[] =

"LHarc version 1.13c Copyright(c) H.Yoshizaki(吉崎栄泰), 1988-89.\n"

"============================================================= 1989 - 5 - 21 ===\n"

" <<< 高圧縮書庫管理プログラム >>>\n"

"===============================================================================\n"

" 使用法:LHarc [<命令>] [{/|-}{<スイッチ>[-|+|2|<オプション>]}...] <書庫>\n"

" [<ドライブ>:|<基準ディレクトリ>\\] [<パス> ...]\n"

"-------------------------------------------------------------------------------\n"

" 《命令》\n"

" a: 書庫ファイルを追加 u: 書庫ファイルを追加(日時照合付)\n"

" f: 書庫ファイル更新 m: 書庫ファイルを移動(日時照合付)\n"

" d: 書庫内のファイルの削除 e,x: 書庫からファイルを取り出す\n"

" p: 書庫内のファイルの閲覧 l,v: 書庫の一覧表示\n"

" s: 自己解凍書庫作成 t: 書庫内のファイルCRC チェック\n"

" 《スイッチ》\n"

" r: 再帰収集を行う w: ワークディレクトリ指定\n"

" x: ディレクトリ名を有効にする m: 問い合わせを行わない\n"

" p: 名前比較を厳密に行う c: 日時照合を行わない\n"

" a: 全属性を凍結の対象とする v: 他のユーティリティファイルを閲覧\n"

" n: 経過表示をしない k: 自動実行のキーワードの設定\n"

" t: 書庫の時刻を最新のファイルに\n"

"===============================================================================\n"

" 転載・再配布などは自由です。 Nifty-Serve PFF00253\n"

" (詳しくは使用の手引をご覧ください。) ASCII-pcs pcs02846";

英語版の使い方

char use[] =

"LHarc version 1.13c Copyright (c) Haruyasu Yoshizaki, 1988-89.\n"

"================================================================ 05/21/89 ===\n"

" <<< High-Performance File-Compression Program >>>\n"

"===============================================================================\n"

"usage: LHarc [<command>] [{{/|-}{<switch>[-|+|2|<option>]}}...] <archive_name>\n"

" [{<drive_name>:}|{<home_directory_name>\\}] [<path_name> ...]\n"

"-------------------------------------------------------------------------------\n"

" <command>\n"

" a: Add files to archive u: Update files to archive\n"

" f: Freshen files in archive m: Move new files into archive\n"

" d: Delete files from archive e,x: EXtract files from archive\n"

" p: disPlay files in archive l,v: View List of files in archive\n"

" s: make a Self-extracting archive t: Test integrity of archive\n"

" <switch>\n"

" r: Recursively collect files w: assign Work directory\n"

" x: allow eXtended file names m: no Message for query\n"

" p: distinguish full Path names c: skip time-stamp Check\n"

" a: allow any Attributes of files v: View files by another utility\n"

" n: display No indicator k: Key word for AUTOLARC.BAT\n"

" t: archive's Time-stamp option\n"

"===============================================================================\n"

" You may copy or distribute without any donation to me. Nifty-Serve PFF00253\n"

" (See the User's Manual for detailed descriptions.) ASCII-pcs pcs02846";

https://www.vector.co.jp/soft/dl/dos/util/se002340.html から

2025-07-28

anond:20250728111554

その記事最初写真自己矛盾してるじゃん

To run a command administrator...

2025-06-13

我が名はサイボーグdorawii

パーマリンク署名対象にするより堅牢自動化を作れた。

一度投稿したうえで別タブを開いてプログラム的(fetch)に送信してその別タブが閉じられる仕組み。

改めてスクリプト配布しちゃる

最初投稿してエントリページに移動した親タブ側のjsコード
// ==UserScript==
      // @name         PGP署名検出と別タブ自動編集
      // @namespace    http://tampermonkey.net/
      // @version      1.0
      // @description  PGP署名がない投稿自動編集ページへ誘導
      // @match        https://anond.hatelabo.jp/*
      // @grant        GM_setValue
      // @grant        GM_getValue
      // @grant        GM.openInTab
      // ==/UserScript==

      (function () {
        'use strict';

        const body = document.getElementById('entry-page');
        if (!body) return;

        const titleText = document.title;
        if (!titleText.includes('dorawii')) return;

        const pgpRegex = /BEGIN.*PGP(?: SIGNED MESSAGE| SIGNATURE)?/;
        const preElements = document.querySelectorAll('div.body pre');
        let hasPgpSignature = false;

        for (const pre of preElements) {
          if (pgpRegex.test(pre.textContent)) {
            hasPgpSignature = true;
            break;
          }
        }

        if (hasPgpSignature) return;

        const editLink = document.querySelector('a.edit');
        const childTab = GM.openInTab(editLink.href, { active: false, insert: true, setParent: true });

      })();
親タブから開かれる編集ページの子タブのjsコード
 // ==UserScript==
      // @name         編集ページ処理と自動送信・閉じ
      // @namespace    http://tampermonkey.net/
      // @version      1.0
      // @description  編集ページで署名処理と送信、タブ自動閉じ
      // @match        https://anond.hatelabo.jp/dorawii_31/edit?id=*
      // @grant        GM_getValue
      // @grant        GM_xmlhttpRequest
      // @grant        GM_setClipboard
      // @grant        GM_notification
      // @connect      localhost
      // ==/UserScript==

      (async function () {
        'use strict';

        const shouldRun = await GM_getValue('open-tab-for-edit', '0');

        const textareaId = 'text-body';
        const textarea = document.getElementById(textareaId);

        if (!textarea) return;

        const content = textarea.value;

        const pgpSignatureRegex = /-----BEGIN PGP SIGNED MESSAGE-----[\s\S]+?-----BEGIN PGP SIGNATURE-----[\s\S]+?-----END PGP SIGNATURE-----/;
        if (pgpSignatureRegex.test(content)) {
          console.log('[PGPスクリプト] 署名が検出されたためそのまま送信します');
          return;
        }

        const httpRequest = (url, data) => {
          return new Promise((resolve, reject) => {
            GM_xmlhttpRequest({
              method: 'POST',
              url: url,
              headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
              data: `value=${encodeURIComponent(data)}`,
              onload: function (response) {
                resolve(response.responseText);
              },
              onerror: function (error) {
                reject(error);
              }
            });
          });
        };


        // textarea の値を取得
        // 1. 現在のページのURLからURLオブジェクト作成
        const currentUrl = new URL(window.location.href);

        // 2. ベースとなる部分 (例: "https://anond.hatelabo.jp") を取得
        const origin = currentUrl.origin;

        // 3. 'id' パラメータの値 (例: "20250610184705") を取得
        const idValue = currentUrl.searchParams.get('id');

        // 4. ベース部分とIDを結合して、目的URL文字列を生成
        //    idValueが取得できた場合のみ実行する
        let newUrl = null;
        if (idValue) {
          newUrl = `${origin}/${idValue}`;
        }

        // 5. 生成されたURL変数に代入し、コンソールに出力して確認
        console.log(newUrl);
        const valueToSend = newUrl;

        try {
          const signatureText = await httpRequest('http://localhost:12345/run-batch', valueToSend);
          console.log('バッチ応答:', signatureText);
          if (!signatureText.includes('BEGIN PGP SIGNED MESSAGE')) {
            alert('PGP署名クリップボードに見つかりませんでした。');
            return;
          }

          const newText = content.replace(/\s*$/, '') + '\n' + signatureText + '\n';
          textarea.value = newText;

          console.log('[PGPスクリプト] 署名を貼り付けました。送信を再開します。');


          const form = document.forms.edit;

          const newForm = form.cloneNode(true);
          form.replaceWith(newForm);

          newForm.addEventListener('submit', async (e) => {
            e.preventDefault(); // HTML標準のsubmitをキャンセル
            const bodyText = textarea?.value || '';

            // reCAPTCHA トークンの取得
            const recaptchaToken = await new Promise((resolve) => {
              grecaptcha.enterprise.ready(() => {
                grecaptcha.enterprise.execute('hoge', { action: 'EDIT' })
                  .then(resolve);
              });
            });

            // POSTするデータの構築
            const formData = new FormData(newForm);
            formData.set('body', bodyText);
            formData.set('recaptcha_token', recaptchaToken);
            formData.set('edit', '1');
            try {
              const response = await fetch(newForm.action, {
                method: 'POST',
                body: formData,
                credentials: 'same-origin'
              });


              if (response.ok) {
                console.log('送信成功');
                window.close();


              } else {
                console.error('送信失敗', response.status);
              }
            } catch (err) {
              console.error('送信中にエラーが発生', err);
            }

          });

          // プログラム的に送信トリガー
          newForm.dispatchEvent(new Event('submit', { bubbles: true }));

        } catch (e) {
          console.error('バッチ呼び出し失敗:', e);
        }

      })();
node.jsで動かすローカルサーバーコード
const http = require('http');
const { exec } = require('child_process');
const querystring = require('querystring');

const server = http.createServer((req, res) => {
  if (req.method === 'GET' && req.url === '/ping') {
    res.writeHead(200);
    res.end('pong');
  } else if (req.method === 'POST' && req.url === '/run-batch') {
    let body = '';

    req.on('data', chunk => {
      body += chunk.toString();
    });

    req.on('end', () => {
      const parsed = querystring.parse(body);
      const value = parsed.value || 'default';

      // 値を引数としてバッチに渡す
      exec(`C:\\Users\\hoge\\Desktop\\makesign.bat "${value}"`, { encoding: 'utf8' }, (err, stdout, stderr) => {
        if (err) {
          res.writeHead(500);
          res.end('Error executing batch: ' + stderr);
        } else {
          res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' });
          res.end(stdout.trim());
        }
      });
    });

  } else {
    res.writeHead(404);
    res.end('Not found');
  }
});

server.listen(12345, () => {
  console.log('Batch server running at http://localhost:12345/');
});
@echo off
setlocal enabledelayedexpansion


:: 署名するファイルset "infile=%~1"
set outfile=%TEMP%\pgp_output.asc

:: 以前の出力があれば削除
if exist "%outfile%" del "%outfile%"


:signloop
:: AutoHotkeyパスフレーズ入力(gpgがパスワード要求するダイアログが出た場合に備える)
start "" /b "C:\Users\hoge\Documents\AutoHotkey\autopass.ahk"

:: PGPクリア署名作成
echo %infile% | gpg --yes --clearsign --output "%outfile%"


:: 署名成功していればループを抜ける
if exist "%outfile%" (

    goto postprocess
) else (

    timeout /t 1 > nul
    goto signloop
)
:postprocess

powershell -nologo -command ^
  "$header = '>|'; $footer = '|<'; $body = Get-Content '%outfile%' -Raw; Write-Output ($header + \"`r`n\" + $body + $footer)"

powershell -nologo -command ^
  "$header = '>|'; $footer = '|<'; $body = Get-Content 'signed.asc' -Raw; Set-Clipboard -Value ($header + \"`r`n\" + $body + $footer)"

endlocal
exit /b
AutoHotkey(以前と同じ)
#Persistent
#SingleInstance ignore
SetTitleMatchMode, 2
WinWaitActive, pinentry
SendInput password
Sleep 100
SendInput {Enter}
ExitApp

動けばいいという考えで作っているので余分なコードも含んでいるかもしれない。

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

https://anond.hatelabo.jp/20250613185036 
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQTEe8eLwpVRSViDKR5wMdsubs4+SAUCaEv1FQAKCRBwMdsubs4+
SHHkAQDUOLgBcdji2T6MJ7h/vlMdFfGlWAzNdXijjE1gIuEPywEAiMNMZqhrMmtl
c7UqRuggNJ/UTa5xTIcKp622+7jJQQg=
=Lgkl
-----END PGP SIGNATURE-----

2025-06-09

dorawii

ようやく(ほぼ)すべてが自動化された。

あとはローカルサーバーの起動をスタートアップに設定する(方法AIに聞いて指示に従う)だけの消化試合

ここにほとんどAI頼りのコードを公開しておく。

事前にインストールしておくもの

autohotkey

nodejs

ユーザースクリプトを実行できる拡張機能

パスとかの注意

署名要求してくるパスワードを自動入力するahkファイルドキュメントAutoHotkey配下に置いた。

バッチファイル(make.sign.bat)はデスクトップに置いた。

以下コード

autopass.ahk
#Persistent
#SingleInstance ignore
SetTitleMatchMode, 2
WinWaitActive, pinentry
SendInput お前のパスワード
Sleep 100
SendInput {Enter}
ExitApp
run-bacth-server.js
// run-batch-server.js
const http = require('http');
const { exec } = require('child_process');

const server = http.createServer((req, res) => {
  if (req.url === '/ping') {
    res.writeHead(200);
    res.end('pong');
  } else if (req.url === '/run-batch') {
    exec('C:\\Users\\you\\Desktop\\makesign.bat', (err) => {
      res.writeHead(200);
      res.end(err ? 'Error' : 'OK');
    })
    ;
  } else {
    res.writeHead(404);
    res.end('Not found');
  }
});

server.listen(12345, () => {
  console.log('Batch server running at http://localhost:12345/');
});
makesign.bat
@echo off
setlocal enabledelayedexpansion

:: ミリ秒単位UTC時刻を取得
for /f %%a in ('powershell -nologo -command "[int64]::Parse((Get-Date).ToUniversalTime().ToString('yyyyMMddHHmmssfff'))"') do set timestamp=%%a

:: 署名するファイルset infile=%TEMP%\pgp_input.txt
set outfile=%TEMP%\pgp_output.asc

:: 以前の出力があれば削除
if exist "%outfile%" del "%outfile%"

:: タイムスタンプを原文として保存
echo %timestamp% > "%infile%"

:signloop
:: AutoHotkeyパスフレーズ入力(gpgがパスワード要求するダイアログが出た場合に備える)
start "" /b "C:\Users\infini\Documents\AutoHotkey\autopass.ahk"

:: PGPクリア署名作成
gpg --yes --clearsign --output "%outfile%" "%infile%"


:: 署名成功していればループを抜ける
if exist "%outfile%" (
    echo [INFO] 署名成功
    goto postprocess
) else (
    echo [WARN] 署名失敗、再試行します…
    timeout /t 1 > nul
    goto signloop
)
:postprocess

:: PowerShellで余計な改行なしに |< をつけてクリップボードコピー
powershell -nologo -command ^
  "$header = '>|'; $footer = '|<'; $body = Get-Content '%outfile%' -Raw; Set-Clipboard -Value ($header + \"`r`n\" + $body + $footer)"

echo Done. signed.asc created and clipboard updated (no extra blank line).
endlocal
exit /b
tempermonkeyとかに登録するユーザースクリプト
// ==UserScript==
// @name         PGP署名自動付加スクリプト(GM_xmlhttpRequest版)
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  投稿前にPGP署名を付けてから送信(fetch未使用)
// @match        https://anond.hatelabo.jp/dorawii_31/edit*
// @grant        GM_xmlhttpRequest
// @grant        GM_setClipboard
// @grant        GM_notification
// / @connect      localhost
// ==/UserScript==

(function () {
  'use strict';

  const submitId = 'submit-button';
  const textareaId = 'text-body';
  const localServer = 'http://localhost:12345/run-batch';

  const pgpSignatureRegex = /-----BEGIN PGP SIGNED MESSAGE-----[\s\S]+?-----BEGIN PGP SIGNATURE-----[\s\S]+?-----END PGP SIGNATURE-----/;

  const httpRequest = (url) => {
    return new Promise((resolve, reject) => {
      GM_xmlhttpRequest({
        method: 'GET',
        url: url,
        onload: function (response) {
          resolve(response.responseText);
        },
        onerror: function (error) {
          reject(error);
        }
      });
    });
  };

  const interceptClick = () => {
    const btn = document.getElementById(submitId);
    if (!btn || btn.dataset.pgpIntercepted === 'true') return;
    btn.dataset.pgpIntercepted = 'true';

    btn.addEventListener('click', async function (e) {
      const textarea = document.getElementById(textareaId);
      if (!textarea) return;

      const content = textarea.value;

      if (pgpSignatureRegex.test(content)) {
        console.log('[PGPスクリプト] 署名が検出されたためそのまま送信します');
        return;
      }

      e.preventDefault();
      e.stopImmediatePropagation();
      console.log('[PGPスクリプト] 署名が見つからないため処理を停止し、署名を取得します');

      try {
        await httpRequest(localServer); // バッチ実行

        const signatureText = await navigator.clipboard.readText();
        if (!signatureText.includes('BEGIN PGP SIGNED MESSAGE')) {
          alert('PGP署名クリップボードに見つかりませんでした。');
          return;
        }

        const newText = content.replace(/\s*$/, '') + '\n' + signatureText + '\n';
        textarea.value = newText;

        console.log('[PGPスクリプト] 署名を貼り付けました。送信を再開します。');
        btn.click(); // イベント再発火

      } catch (err) {
        alert('PGP署名の取得または貼り付けに失敗しました。\n' + err);
      }
    }, true);
  };

  window.addEventListener('load', () => {
    setTimeout(interceptClick, 1000);
  });
})();

プロミスメソッドとか全然まだ理解してなくてそのなかに関数代入したその関数オブジェクトプロパティresponseを?いやまあそのあたりのコードが示すデータの流れが全然理解できないような人間でもここまでできちゃった。

AIすごいなと思うよ。そして思うのは今後重要になってくるのは文法とか自体に詳しいことじゃなくて、そのプログラムの処理内容を指示できるシステムエンジニア的な言語化能力のほうじゃないかなと思った。

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

20250609111559680 
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQTEe8eLwpVRSViDKR5wMdsubs4+SAUCaEbCbwAKCRBwMdsubs4+
SLueAPwOv7PBk4voAe5qlcCEvs/PJhmKc5QAb/1R43JMQFuDZgD/UTPEKsL/PhK9
jFGv2HDXK1dVjLNwvosgX9uYJh5xxwY=
=qiOE
-----END PGP SIGNATURE-----

2025-06-08

dorawii

ChatGPTにバッチファイルを作ってもらったのでこれから署名捗るぞ。これだけ手軽化できたらレスバに入っても署名つけるのも億劫にならずできそうだ。

なにせ文章を書き折ったらあとはバッチダブルクリックしてCtr+Vするだけだ。

原文には現在日時のミリ秒表示を使うことにした。

名乗る人が増えることを期待して作らせたものを公開しておく。

@echo off
setlocal

:: ミリ秒単位UTC時刻を取得
for /f %%A in ('powershell -nologo -command "[int64]::Parse((Get-Date).ToUniversalTime().ToString('yyyyMMddHHmmssfff'))"') do set timestamp=%%A

:: PGPクリア署名作成
echo %timestamp% | gpg --yes --clearsign > signed.asc

:: PowerShellで余計な改行なしに |< をつけてクリップボードコピー
powershell -nologo -command ^
  "$header = '>|'; $footer = '|<'; $body = Get-Content 'signed.asc' -Raw; Set-Clipboard -Value ($header + \"`r`n\" + $body + $footer)"

echo Done. signed.asc created and clipboard updated (no extra blank line).
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

20250608045542542 
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQTEe8eLwpVRSViDKR5wMdsubs4+SAUCaEUXzgAKCRBwMdsubs4+
SCvuAQDjRjPVCO1F9DgmAKoqKYG7qB9r4e7y2Ky+/umT/OhnygEA8h2NL8zIczSp
hcOk/MaDWJJ2Y7WDA3d6gxFakW8TKAw=
=HE4/
-----END PGP SIGNATURE-----

2025-05-29

anond:20250528120116

ChatGPTで際どいことを書いてもらうのに抑えてえおきたいポイント

じゃあ、なんで急に書いてもらえなくなったのか。
これによって何が起きるか?
  • 連続して会話しても、「最後に保存された応答」からの基点となってしまうため、話がつながらない。
  • たとえば、ここまで A→B→C→D→E と会話を続けて上限に達した後、→F と1回だけ会話はできるが、
  • その次の会話は A→B→C→D→E→Gと判別されてしまい、話がつながらない。
  • 表示上の見た目は A→B→C→D→E→F→G とつながっているにもかかわらず、である
  • これによって、自分から見えている会話と異なり、ChatGPTから見た会話は途中が欠落しているため、急に拒否されるなど豹変したような応答になる場合がある。
もうひとつ、急に会話が拒否される理由がある。コンテキスト長の限界だ。

では具体的にどう対処すればいいか

1. メモリはオンにする必要はない
2. 会話上限に達した場合は、諦めて新しい会話に改める
3. GPT-4oで拒否されたときは (無料アカウント場合) GPT-4.1 miniに聞いてみよ

制限のゆるいLLM

Grok3
HuggingChat で利用できる Command R+ (CohereLabs/c4ai-command-r-plus-08-2024)

(※1) 大規模言語モデルとの会話は、AIがこれまでの会話を「記憶」しているのではなく、リクエストのたびに、過去の会話を読み直している。ChatGPT場合は、上限を超えると、古い会話から順次まれなくなるっぽい。

2025-05-23

スターウォーズ英語を学ぼう

Lord Vader, am I still in command?」と「So I'm still in command?」の英語的なニュアンスの違い、そしてどちらがより傲慢(arrogant)に聞こえるかを解説します。

1. 「Lord Vader, am I still in command?」のニュアンス

この言い方は、

より丁寧であり、

ベイダーへの敬意(Lord Vaderと呼びかけている)が強調され、

形式的礼儀正しい印象

を与えます

このフレーズは「私はまだ指揮官でよろしいのでしょうか?」という、やや控えめでお伺いを立てる表現です。

傲慢さはあまり感じられません。

2. 「So I'm still in command?」のニュアンス

一方で、劇中の「So I'm still in command?」は、

呼びかけがなく、

いきなり結論確認する形で、

少し自己中心的、または焦りや苛立ちがにじむ表現です。

この「So」は、「じゃあ」「つまり」といったニュアンスで、

「(いろいろ言われたけど)結局、俺が指揮官ってことでいいんだよな?」

という自己主張自分立場への執着が強く表れています

このため、ベイダーに対して「俺の立場をはっきりさせろ」と迫るような、やや生意気傲慢自己中心的な印象を与えます

3. どちらが傲慢に聞こえるか?

「So I'm still in command?」の方が、より傲慢自己中心的に聞こえます

Lord Vader, am I still in command?」は丁寧で、上司への敬意が感じられる。

「So I'm still in command?」は、呼びかけもなく、結論だけを急ぐ印象で、相手説明権威を軽視しているようにも取れる。

そのため、ベイダーが苛立ち、フォースチョークを使ったのも、「So I'm still in command?」という言い方のほうが、より不遜で生意気だったからだと考えられます

まとめ

Lord Vader, am I still in command?」= 丁寧・控えめ・敬意あり

「So I'm still in command?」= 自己主張・焦り・やや傲慢

劇中のクレニックの言い方は、ベイダー逆鱗に触れるに十分な、やや生意気ニュアンスが含まれていた、ということです。

2025-04-24

下記プログラムテストコードを書いてください

#include <stdio.h>

main( ){

    printf("hello, world\n");

}

C言語簡単テストコードを書く(より自動化に近い形)

C言語で別のプログラム作成し、system 関数などを使って最初プログラムを実行し、その出力を読み取って比較する方法です。

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

int main() {

char expected_output[] = "hello, world\n";

char actual_output[100]; // 十分なバッファサイズを確保

// hello プログラムを実行し、出力を actual_output にリダイレクト環境依存

// これは非常に簡略化された概念であり、実際にはパイプ処理などが必要になります

char command[200];

#ifdef _WIN32

sprintf(command, "hello.exe > temp_output.txt");

#else

sprintf(command, "./hello > temp_output.txt");

#endif

system(command);

FILE *fp = fopen("temp_output.txt", "r");

if (fp != NULL) {

fgets(actual_output, sizeof(actual_output), fp);

fclose(fp);

remove("temp_output.txt"); // 一時ファイルを削除

} else {

printf("エラー:一時ファイルオープンに失敗しました\n");

return 1;

}

if (strcmp(actual_output, expected_output) == 0) {

printf("テスト成功: 出力は期待通りです\n");

return 0;

} else {

printf("テスト失敗: 期待された出力 '%s'、実際の出力 '%s'\n", expected_output, actual_output);

return 1;

}

}

2025-02-03

Emacs廃人ライフ

俺のEmacsライフは、もはやただのエディタを超えて、完全に生活のものだ。

日常のあらゆる側面がEmacs支配されていて、他のソフトウェアなんて目にも入らねぇ。

今日は、どれだけ俺がこの深淵世界に没頭しているか、そのレベルを見せてやるぜ。

1. 自作パッケージLispの力

俺の.emacs.dには、数十種類どころか、もう百を超える自作パッケージが眠ってる。

特に自分で書いたLisp関数は、日々のタスク自動化するために欠かせねぇ。

例えば、特定フォルダ内のMarkdownファイル自動HTMLに変換してブラウザで表示するスクリプトを組んじまった。

これでブログを書くたびに手間いらずで、「C-c C-v」でプレビューできる快感は、もう中毒だぜ。

サンプルLispコード
(defun my-markdown-to-html ()
  "MarkdownファイルHTMLに変換してブラウザで表示する関数"
  (interactive)
  (let ((markdown-file (read-file-name "Markdownファイル選択: ")))
    (shell-command (format "pandoc %s -o %s.html" markdown-file (file-name-sans-extension markdown-file)))
    (browse-url (concat (file-name-sans-extension markdown-file) ".html"))))

この関数を使えば、Markdownファイルを選んで一発でHTMLに変換し、そのままブラウザで表示できる。これがなきゃブログなんて書けないぜ。

2. Org-modeによる人生管理

Org-modeは俺の人生のものだ。TODOリストスケジュール管理だけじゃなくて、プロジェクト管理文書作成まで全てを一元化してる。

特にカスタムキャプションプロパティドロップダウンメニューを駆使して情報整理に命懸けてるんだ。

さらに、Org Babel使ってRやPythonコードを直接実行しながらデータ分析なんて日常茶飯事だ。この機能のおかげで、データサイエンスEmacs内で完結しちまうからたまんねぇよ。

3. キーバインドマクロ神業

俺のキーバインド設定は他者には理解不能レベルだ。

自分専用にカスタマイズしたショートカットが数百種類もあるんだぜ。

「M-p」で過去コミットメッセージを呼び出す機能なんか、Gitとの連携が一瞬でできるから開発効率が飛躍的に向上する。

さらに、Emacsにはマクロ機能があるから自分操作を記録して再生することもできる。

この前、自分専用のマクロを作って、特定フォーマットドキュメントを一瞬で整形することができた。

これで「お前は本当に人間なのか?」って言われてもおかしくないレベルだ。

4. Emacs Lispによる拡張

Emacs Lispを書くことが俺の日常になってる。この前、自分だけのコード補完システムを構築したばかりだ。

この機能のおかげで、特定キーワード入力すると関連するコードスニペットが自動的に提案される仕組みになってるからコーディング中に思考が途切れることなスムーズに進行するぜ。

コード補完システムサンプル
(defun my-auto-complete ()
  "カーソル位置に基づいてコードスニペットを提案する"
  (interactive)
  (let ((input (thing-at-point 'symbol)))
    (if input
        (let ((completion-list '("myFunction" "myVariable" "myClass")))
          (setq completion-list
                (cl-remove-if-not
                 (lambda (item) (string-prefix-p input item))
                 completion-list))
          (if completion-list
              (message "候補: %s" (string-join completion-list ", "))
            (message "候補なし")))
      (message "シンボルが見つかりません"))))

この関数ではカーソル位置からシンボルを取得し、それに基づいて候補を表示する。これがあればコーディング中も迷わず進められるぜ。

5. Emacsと共に生きるコミュニティ

Emacsユーザーとして活動している中で、多くの仲間と出会った。

彼らとの情報交換や共同開発は刺激的で、新しいアイデアが次々と生まれてくる。この循環こそが俺の成長につながっていると実感しているんだ。

最近では、自分が開発したパッケージGitHubで公開し、フィードバックを受け取ってさらなる改善点を見つけたりもしている。

このフィードバックループがあるからこそ、自分自身進化し続けられるんだ。

結論Emacsこそ俺の人生

今やEmacsは単なるツールじゃなくて、俺自身の一部になってる。

この深淵世界で探求し続けることで、新たな発見や挑戦が待っている。

これからEmacsユーザーとして、自分だけのユニーク環境を追求し続けていくつもりだぜ!

2024-12-17

Top Trends in Travel Portal Development Every Business Should Watch

In the ever-evolving travel industry, travel portal have become fundamental tools for businesses looking to enhance customer experience It's streamline operations. With traveler increasingly relying on digital platforms to book everything from flights to hotels, the need for sophisticated, user-friendly, It's high-performing travel portals has never been more crucial. The growth of this sector is driven by numerous factors, including technological advancements, consumer behavior shifts, It's the quest for organization. This article explores the top trends in travel portals development that every business should pay attention to in 2024 It's beyond.

1. Artificial Intelligence and Machine Learning in Travel Portal Development

Artificial Intelligence (AI) and Machine Learning (ML) have quickly become foundational components of travel portal development. These technologies are revolutionizing the way businesses personalize services, predict consumer behavior, and optimize booking processes. AI and ML algorithms analyze large data sets to understand customers preferences, allowing for real-time customization of travel recommendations. From dynamic pricing models to

customized travel suggestions, AI help businesses offer an unequaled user experience.

For instance, AI chatbots are becoming successively popular for customer service. They can answer customer queries 24/7, assist in bookings, It's even provide real-time travel updates, enhancing the overall customers experience. Furthermore, AI-powered tools such as a recommendation engines analyze past booking behavior to suggest tailored itineraries, making travel planning much easier for user.

2. Mobile-First Approach for Travel Portal Development

With the increasing use of smartphones, as a mobile first approach is no longer optional for businesses in the travel industry. More It's more travelers are relying on their smartphones for booking flights, boardinghouse, It's activities on the go. For travel portals to stay competitive, ensuring seamless mobile optimization is crucial.

A mobile optimized travel portal ensures that users have access to the same features and functionalities on their mobile devices as they would on a desktop. It’s not just about making the site responsive—it’s about creating an intuitive, fast, and easy to navigate experience. This includes features like mobile-specific payment options, mobile check-in for airlines It's hotels, It's easy access to customers support.

3. Integration of Blockchain for Secure Transactions

Blockchain technology is making waves across various industries, and the travel sector is no exception. Blockchain based travel portals offer a significant advantage when it comes to security It's transparency. Blockchain’s ability to provide secure, tamper proof record makes it ideal for transactions involving bookings, payment, It's loyalty program.

By integrating blockchain, travel businesses can ensure secure It's fast transactions, protect customer data, It's reduce fraud. Blockchain also facilitates easier It's more transparent loyalty program management. Travelers can accumulate rewards points across various service providers, all within the same blockchain framework, creating as a more cohesive It's rewarding experience.

4. Enhanced Payment Solutions and Digital Wallets

One of the most significant changes in the travel industry has been the shift toward contactless payment. Digital wallets, such as a Apple Pay, Google Wallet, It's cryptocurrency wallets, are now widely accepted in travel portals. These payment solutions offer a faster, more secure, It's convenient way for travelers to complete transactions.

For businesses, adopting multiple payment gateways is essential for attracting global customer. International traveler can face issues with currency exchange It's transaction fees, but by offering localized payment method It's supporting a wide range of digital wallets, businesses can significantly improve customers satisfaction It's retention.

5. Voice Search and Virtual Assistants

Voice search is one of the fastest growing trends in the tech world, and the travel industry is no exception. Voice search optimization is becoming an essential part of travel portal development. With the rise of virtual assistants like Amazon’s Alexa, Google Assistant, It's Apple’s Siri, travelers are increasingly using voice command to search for flights, hotels, It's destinations.

For businesses, this means optimizing travel portals for voice search. Voice-friendly portal with natural language processing capabilities can provide users with more accurate results It's make booking processes quicker It's easier. Additionally, integrating virtual assistants into portals can enhance customers service by answering common queries It's assisting with bookings.

6. Augmented Reality (AR) and Virtual Reality (VR) Experiences

(AR) and (VR) technologies are transforming the way travelers experience destinations and plan their trips. Intensified Reality allows traveler to view destinations, hotel, or local attractions in real time through their mobile devices. For example, an AR feature in a travel portal could allow user to take a virtual tour of a hotel room or explore a city’s landmarks in 3D.

Virtual Reality, on the other hand, can transport users to a destination before they even book their trip, providing immersive previews of their potential vacation. Integrating (AR) It's (VR) into travel portal not only elevates the user experience but also drives engagement by offering something truly unique.

7. Customizable and Personalized Travel Packages

Personalization is key to standing out in the competitive travel industry. Travelers today expect customizable travel packages that cater to their unique need and preferences. From flight choices to hotel rooms, activities, It's local experiences, organization allows businesses to create tailored experiences that resonate with their customer.

Advanced travel portal use customer data to offer customized deal, travel itineraries, It's destination recommendations. By analyzing past booking behaviors It's preferences, businesses can deliver highly relevant options, thus increasing the likelihood of conversion. Offering dynamic packaging allows users to mix and match services based on their preferences, creating a more flexible It's customized booking experience.

8. Sustainability and Eco-Friendly Travel Options

As a coincidental concerns continue to rise, more travelers are becoming mindful of their carbon footprint. Sustainable travel has become a major trend in the tourism industry, It's businesses are responding by incorporating Eco-friendly options into their travel portal. Whether it’s booking Eco-conscious accommodations, flights with lower carbon emissions, or supporting local sustainable experiences, travelers are now seeking out environmentally responsible options.

Travel portals that emphasize sustainability and provide clear, detailed information about eco-friendly options are likely to attract a growing segment of conscientious travelers. Businesses can also promote their commitment to sustainability by partnering with Eco-friendly service providers and offering travelers the ability to offset their carbon emissions.

9. Integration with Social Media and User-Generated Content

Social media plays a pivotal role in travel decision making. More than ever, travelers are relying on user generated content (UGC) like reviews, photos, and videos from social platforms to guide their choices. Integrating (UGC) into travel portals allows businesses to tap into this social proof It's build trust with potential customer.

For instance, allowing users to share their experiences via social media or review platforms can provide valuable insights for other travelers. Additionally, incorporating social sharing features within the portals itself can encourage users to engage with your brand It's share their travel experiences, thereby driving more traffic to the portal.

10. API Integrations and Multi-Channel Distribution

As the travel landscape becomes more fragmented, travel businesses must offer a consistent experience across multiple channels. API integrations are key to ensuring that travel portals can access real-time data and distribute it across different platforms. APIs allow travel portal to integrate with global distribution system (GDS), airlines, hotels, car rental services, It's other travel-related services seamlessly.

By offering multi-channel distribution, business can maximize their reach, whether through desktop websites, mobile app, or third party platform like OTAs (Online Travel Agents). This integration also ensures real-time availability update It's better inventory management.

Source & Published by: https://www.namantechnolab.com/

2024-10-06

Command-R-plusがすっげーぞと聞いたので初ローカルLLMとして試したらまーものすごく遅くていかんかった

たった100Bでとか言ってるのを見かけたからそれが全体的に見て軽いのかと思ってたら全然だったな

結局Ninja-v3あたりに落ち着きそう

2024-08-20

macos の ctrl と commandwindows みたいに ctrl としてのみ扱う方法教えてくれ

firefox 使ってると commandwindows の ctrl キーなんだけど、terminal で emacs keybind だと windows 同様の ctrl になる。

windows だと区別なく ctrl なのでポジションが変わらんのだが、macos 使ってると ctrl と commandアプリケーションで押し分けねばいけなくてストレスやばい

ログイン ユーザー登録
ようこそ ゲスト さん