Skip to content

Instantly share code, notes, and snippets.

View dohzoh's full-sized avatar

dozo dohzoh

  • DzWorks
View GitHub Profile
@dohzoh
dohzoh / rollup.config.js
Last active August 17, 2021 13:32
rollup-plugin-esbuild 設定ファイル
import svelte from 'rollup-plugin-svelte';
import commonjs from '@rollup/plugin-commonjs';
import resolve from '@rollup/plugin-node-resolve';
import livereload from 'rollup-plugin-livereload';
import sveltePreprocess from 'svelte-preprocess';
import css from 'rollup-plugin-css-only';
import esbuild from 'rollup-plugin-esbuild'
const production = !process.env.ROLLUP_WATCH;
@dohzoh
dohzoh / async.html
Last active August 12, 2021 12:02
JavaScript Web Worker MultiThreading
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
<title>My awesome Rust, WebAssembly, and Parcel application</title>
<script src="./async.mjs" type="module"></script>
<input type="button" id="start_button" value="start" />
<ul>
<li><a href="./index.html">index.html</a></li>
<li><a href="./async.html">async.html</a></li>
import rust from "@wasm-tool/rollup-plugin-rust";
export default {
input: "Cargo.toml",
output: {
dir: "dist/js",
format: "iife",
sourcemap: true,
},
plugins: [
@dohzoh
dohzoh / Dockerfile.arch
Last active July 14, 2021 14:48
ArchLinux Dockerfile for WSL2
FROM archlinux:base-devel
ARG UID=1000
ARG GID=1000
ARG USERNAME=dozo
ARG LOCATE=JP
RUN cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup\
&& curl -fsSL "https://archlinux.org/mirrorlist/?country=${LOCATE}&protocol=http&protocol=https&ip_version=4"\
| sed 's/^#Server/Server/g' | tee /etc/pacman.d/mirrorlist
@dohzoh
dohzoh / Dockerfile.slim
Created June 20, 2021 03:41
PlayWright Docker Slim
FROM debian:stable-slim
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
ARG DEBIAN_FRONTEND=noninteractive
# prepare install
RUN apt-get update && apt-get install -y git curl ssh ca-certificates
# === INSTALL Node.js ===
@dohzoh
dohzoh / example.vue
Last active July 18, 2018 06:02
レガシィシステムでVueとPHPの連携を考える ref: https://qiita.com/dozo/items/1116892fb6cb110265e4
<template>
<div @click="changeName()">
Hello, {{name}}.
</div>
</template>
<script>
export default {
data() {
return {
@dohzoh
dohzoh / .profile
Last active April 26, 2020 23:09
fcitxで作るWSL日本語開発環境 ref: https://qiita.com/dozo/items/97ac6c80f4cd13b84558
if [ $SHLVL = 1 ] ; then
xset -r 49 > /dev/null 2&>1
(fcitx-autostart > /dev/null 2&>1 &)
fi
@dohzoh
dohzoh / file0.txt
Last active May 24, 2018 00:50
WebdriverいらずのE2EテストランナーTestcafe ref: https://qiita.com/dozo/items/cab690d51e4b27cb0bbd
$ curl -L git.io/nodebrew | perl - setup
$ set -o noclobber # 念のため
$ echo export PATH='$HOME/.nodebrew/current/bin:$PATH' >> ~/.bashrc
$ source ~/.bashrc
@dohzoh
dohzoh / file0.txt
Last active June 2, 2018 04:14
Windows Subsystem for Linux(旧bash on windows)からPhpStormを動かす ref: https://qiita.com/dozo/items/9bf3965614075f6319f9
$ sudo apt-get install bash-completion build-essential x11-apps libxtst6 git
@dohzoh
dohzoh / file0.txt
Created October 27, 2017 07:11
CodeSnifferをEUC-JP, SJISに適用する ref: http://qiita.com/dozo/items/a94147b22d0b2d2dd4ee
----------------------------------------------------------------------
1 | ERROR | An error occurred during processing; checking has been
| | aborted. The error message was: iconv_strlen(): Detected
| | an illegal character in input string in
| | D:\local\vendor\squizlabs\php_codesniffer\src\Tokenizers\Tokenizer.php
| | on line 193
----------------------------------------------------------------------