Skip to content

Instantly share code, notes, and snippets.

View PyYoshi's full-sized avatar
🌍
Working from The World

MISAWA Yoshihiro PyYoshi

🌍
Working from The World
View GitHub Profile
@PyYoshi
PyYoshi / test.sql
Last active August 16, 2023 04:19
MySQL JSON型のINDEX検証
CREATE TABLE `test_json_tbl` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`columns` json DEFAULT (_utf8mb4'[]'),
`name` text COLLATE utf8mb4_general_ci,
`selections` json DEFAULT (_utf8mb4'[]'),
PRIMARY KEY (`id`),
KEY `idx_columns1` ((cast(json_extract(`columns`,_utf8mb4'$[*].value') as char(512) array))),
KEY `idx_columns2` ((cast(json_extract(`columns`,_utf8mb4'$[*]._id') as char(64) array))),
KEY `idx_selections1` ((cast(json_extract(`selections`,_utf8mb4'$[*].value[*]') as char(512) array))),
KEY `idx_selections2` ((cast(json_extract(`selections`,_utf8mb4'$[*]._id') as char(64) array))),
@PyYoshi
PyYoshi / squid
Last active April 11, 2023 01:11
低品質回線のためのプロキシ鯖用の設定とか
#!/bin/sh
# chkconfig: 345 98 20
# description: squid server
# processname: squid
# description for chkconfig: 345 98 20
# 345: run levels
# 98: priority to start
# 20: priority to stop
/**
DataStream reads scalars, arrays and structs of data from an ArrayBuffer.
It's like a file-like DataView on steroids.
@param {ArrayBuffer} arrayBuffer ArrayBuffer to read from.
@param {?Number} byteOffset Offset from arrayBuffer beginning for the DataStream.
@param {?Boolean} endianness DataStream.BIG_ENDIAN or DataStream.LITTLE_ENDIAN (the default).
*/
DataStream = function(arrayBuffer, byteOffset, endianness) {
this._byteOffset = byteOffset || 0;
@PyYoshi
PyYoshi / gist:986104
Created May 23, 2011 02:03
Androidのboot.imgナイにあるlogo.rleをpngに変換するツール
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@PyYoshi
PyYoshi / README.md
Last active November 26, 2020 09:29
WXR-2533DHP/WXR-2533DHP2用ファームウェアを展開するためのツール(ストリーミング処理を行っていないのでファイルサイズ分メモリを消費します)
$ go build -o firmware-extractor

$ ./firmware-extractor -h
Usage of firmware-extractor:
  -f string
        WXR-2533DHPのファームウェアファイルを指定してください

$ ./firmware-extractor -f ./wxr_2533dhp2_jp_146
Input:
@PyYoshi
PyYoshi / gist:d4b48a0b186bea7ee4ffd00e0933da7f
Created May 19, 2020 00:48
setup helm-kubeval for github actions
- name: Setup helm-kubeval
env:
KUBEVAL_VERSION: 0.15.0
run: |
curl -L "https://github.com/instrumenta/kubeval/releases/download/$KUBEVAL_VERSION/kubeval-linux-amd64.tar.gz" -o /tmp/kubeval-linux-amd64.tar.gz
tar xvf /tmp/kubeval-linux-amd64.tar.gz -C /tmp
chmod +x /tmp/kubeval
mv /tmp/kubeval /usr/local/bin/
kubeval --version
helm plugin install https://github.com/instrumenta/helm-kubeval
@PyYoshi
PyYoshi / autoexec.cfg
Last active March 19, 2020 16:40
csgo
//// 通信設定
cl_interp "0"
cl_interp_ratio "1"
rate "128000"
cl_cmdrate "128"
cl_updaterate "128"
cl_lagcompensation "1"
cl_interpolate "1"
net_graph "1"

Keybase proof

I hereby claim:

  • I am PyYoshi on github.
  • I am pyyoshi (https://keybase.io/pyyoshi) on keybase.
  • I have a public key whose fingerprint is 8C8F 440B 3390 4D89 6E52 A114 146D 52F7 C000 C2F0

To claim this, I am signing this object:

@PyYoshi
PyYoshi / Dockerfile
Last active August 29, 2018 00:29
mozjpeg 3.3.1, vips 8.6.5
FROM debian:buster-slim
RUN apt update \
&& apt install -y \
autoconf \
wget \
nasm \
build-essential \
pkg-config \
libde265-0 \
@PyYoshi
PyYoshi / _results.txt
Last active August 3, 2018 08:47 — forked from maxpert/results.txt
JSON vs MsgPack using Gzip + LZ4
---------- RAW ----------
JSON 34291 byte(s)
MsgPack 26364 byte(s)
---------- GZIP ---------
JSON 05986 byte(s)
MsgPack 06198 byte(s)
---------- LZ4 ----------
JSON 09758 byte(s)
MsgPack 08548 byte(s)