View renew-sslcert.cmd
This file contains 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
@ECHO off | |
REM certbot wrapper | |
REM renew-sslcert [test] | |
REM testを指定すると、--dry-run (シミュレーション)を付けて実行します。 | |
SETLOCAL | |
if "%~1"=="test" ( | |
SET DRYRUN=--dry-run | |
) else ( | |
SET DRYRUN= | |
) |
View certbot-postauth.cmd
This file contains 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
@ECHO off | |
REM CERTBOT MANUAL CLEANUP AUTH HOOK | |
REM CERTBOTから下記環境変数がセットされてこのファイルが実行されますので、この情報を使ってFTPなどで認証ファイル削除します。 | |
REM CERTBOT_DOMAIN : The domain being authenticated | |
REM CERTBOT_VALIDATION : The validation string | |
REM CERTBOT_TOKEN : Resource name part of the HTTP-01 challenge (HTTP-01 only) | |
REM CERTBOT_REMAINING_CHALLENGES : Number of challenges remaining after the current challenge | |
REM CERTBOT_ALL_DOMAINS : A comma-separated list of all domains challenged for the current certificate |
View sslcert.cmd
This file contains 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
@ECHO off | |
REM certbot wrapper | |
REM sslcert <ドメイン名> [test] | |
REM testを指定すると、--dry-run (シミュレーション)を付けて実行します。 | |
SETLOCAL | |
if "%~1"=="" ( | |
ECHO SSL証明書を取得するドメイン名を入力してください。 | |
GOTO END | |
) |
View index.js
This file contains 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
// ロード | |
import pdf2img from './pdf2img.js'; | |
(($) => { | |
// PDFファイル選択 | |
// -------------------------------------------------------------------------- | |
async function onChangeFile(ev) | |
{ | |
if(this.files.length <= 0) | |
return; |
View pdf2img.js
This file contains 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
/**************************************************************************** | |
* convert pdf to jpeg | |
* | |
* file: File instance (File object), | |
* type: output image format name (String: 'image/jpeg' or 'image/png' only) | |
* resolution: output resolution (INTEGER) | |
****************************************************************************/ | |
import './pdfjs/build/pdf.min.js'; | |
// おまじない。よくわからんけど、付けないとなんかエラー?がでるみたい。 |
View MarcDataParser.js
This file contains 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
/****************************************************************************** | |
Japan Marc Dat file | |
******************************************************************************/ | |
const MATERIALS = new Map([ | |
['a','図書'], | |
['c','楽譜'], | |
['e','地図資料'], | |
['g','映像資料'], |
View table2json.js
This file contains 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
/***************************************************************************** | |
* | |
* table to json | |
* | |
*****************************************************************************/ | |
(function() { | |
HTMLTableElement.prototype.toJSON = toJSON; | |
HTMLTableElement.prototype.toArray = toArray; | |
function toJSON(indent,fn,headers) |
View append-excel-es6.js
This file contains 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
/******************************************************************************* | |
description: | |
ローカルのエクセルファイルを選択すると(<input type="file" id="select-file">、 | |
選択したエクセルファイルへシートを追加し、テーブル要素(<table id="table-0">)を書込み、 | |
そのエクセルシートをダウンロードするためのリンクをdocument.body に追加します。 | |
※このままのコードだと、セルの書式属性は全部消えます。 | |
*******************************************************************************/ | |
(function($) { |
View worker.js
This file contains 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
importScripts('./node_modules/comlink/dist/umd/comlink.min.js'); | |
async function resizer(file,offscreencanvas,max) | |
{ | |
let width = max,height = max; | |
let img = await createImageBitmap(file); | |
let ratio = img.width / img.height; | |
if(ratio < 1 && img.width <= max) | |
return file; |
View resize.image.js
This file contains 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
/************************************************************************** | |
* resize image in file | |
**************************************************************************/ | |
import * as Comlink from "./node_modules/comlink/dist/esm/comlink.min.mjs" | |
export default async function(file,max) | |
{ | |
let canvas = document.createElement('canvas'); | |
let offscreencanvas = canvas.transferControlToOffscreen(); |
NewerOlder