- 公式に、マイグレの方法が書いてあった
- Pythonに、変換パッケージがあるらしい
- 手作業で書き換えることも可能らしい
- 変換したMySQLダンプファイルを、本番MySQLにインポート
- ローカルにディレクトリを作り、Docker PullでVaultwardenの公式イメージを落としてくる
- Dockerを起動し、Vaultwardenイメージを実行
- ローカルで問題なく動くことを確認
// 変数の初期設定 | |
let currentIndex = 0; | |
const lines = document.querySelectorAll('.main-article h2, .main-article p'); | |
// 行にハイライトを追加する関数 | |
function highlightLine(lineIndex) { | |
lines.forEach(line => line.classList.remove('kaisei-active')); | |
// 条件に合った行にハイライトを追加 | |
if (lineIndex >= 0 && lineIndex < lines.length) { |
let isEnabled = false; // フラグを初期化 | |
let selectedElement = null; // 現在選択されている要素を保持 | |
// ページロード時にユニーククラスを適用 | |
document.addEventListener('DOMContentLoaded', () => { | |
applyUniqueClasses(); | |
toggleSelectionMode(false); // 初期状態で選択モードを無効にする | |
}); | |
// 選択モードの切り替えボタン |
import { createApp } from 'vue' | |
import './style.css' | |
import App from './App.vue' | |
import router from './router'; | |
const app = createApp(App) | |
app.use(router) | |
app.mount('#app') |
// chrome.runtime.onInstalled.addListener(() => { | |
// console.log("Extension installed!"); | |
// }); | |
// src/background/service-worker.js | |
let myVariable = "This is a variable from the background script."; | |
chrome.runtime.onMessage.addListener((request, _sender, sendResponse) => { | |
if (request.action === "getVariable") { |
<script setup lang="ts"> | |
import Sidebar from './components/Sidebar.vue'; | |
import { onMounted, ref } from 'vue'; | |
const fontSize = ref(100); // 初期フォントサイズを100% | |
// 初期値をストレージから取得 | |
onMounted(() => { | |
chrome.storage.local.get(['fontSize'], (result) => { | |
fontSize.value = result.fontSize || 100; |
const title = document.querySelector('h1') | |
if(title) { | |
title.style.color = 'red' | |
} | |
// interface Request { | |
// fontSize: number; | |
// } | |
// // 例えば、requestを以下のように定義する |
const delayFunc = (ms: number) => | |
new Promise((resolve) => setTimeout(resolve, ms)); | |
const syncronusProcess = async ( | |
flag: string | undefined, | |
time: number = 1000, | |
iteration: number = 4, | |
) => { | |
let i = 1; | |
while (i <= iteration) { |
// テストにはJestを使用 | |
import { createRandom } from "../functions/helpers"; | |
describe('Create random number between two value: Normal Pattern', () => { | |
test('Return random value is correct', () => { | |
const min = 1; | |
const max = 5; | |
expect(createRandom(min, max)).toBeLessThanOrEqual(max) | |
expect(createRandom(min, max)).toBeGreaterThanOrEqual(min) |
// 配列をランダムに出力したいときの添字出力用 | |
// バリデーションには、Joiを使用 | |
// 負の値、小数点には対応しない | |
import Joi from 'joi' | |
const schema = Joi.object().keys({ | |
min: Joi.number().min(0), | |
max: Joi.number().positive() | |
}) |