Skip to content

Instantly share code, notes, and snippets.

View matsubo's full-sized avatar

Yuki Matsukura matsubo

View GitHub Profile

概要

「ATOTO X10G211E Androidカーナビ」を使ってみて所管をまとめておく

https://amzn.to/3zdUp3Z

不具合

  • スタートアップアプリを登録しているにも関わらず、ラジオがバックグラウンドで起動される。
@matsubo
matsubo / sado_1.csv
Last active September 10, 2024 06:22
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 25 columns, instead of 17 in line 5.
#,No,名前,性別,年齢区分,START,スイムL,スイムF,バイクS,住吉,ランS(本部),ラン4km,ラン9km,ラン10km,ラン14km,ラン19km,ラン20km,ラン24km,ラン29km,ラン30km,ラン34km,ラン39km,FINISH,総合記録,備考
1,1001,星 大樹,男,35-39男子,6:00:00,6:31:18,7:03:33,7:06:20,9:53:42,12:12:07,12:30:40,12:56:21,13:00:29,13:20:43,13:47:58,13:52:08,14:12:58,14:40:36,14:45:03,15:05:47,15:33:06,15:37:11,9:37:11,
2,1112,渡邉 優介,男,35-39男子,6:00:00,6:34:07,7:09:35,7:12:46,10:12:48,12:42:46,12:59:57,13:23:18,13:26:57,13:44:34,14:09:38,14:13:44,14:32:44,14:58:32,15:02:52,15:23:11,15:50:35,15:54:38,9:54:38,
3,1118,丸尾 公貞,男,35-39男子,6:00:00,6:30:12,7:02:03,7:05:44,10:05:19,12:36:19,12:58:01,13:24:01,13:27:50,13:48:16,14:14:44,14:18:58,14:39:52,15:07:30,15:11:38,15:32:25,16:01:30,16:05:52,10:05:52,
4,1098,浜田 裕介,男,35-39男子,6:00:00,6:33:37,7:08:25,7:12:47,10:11:46,12:47:35,13:08:12,13:33:46,13:37:48,13:57:25,14:23:16,14:27:20,14:47:12,15:15:31,15:19:41,15:40:20,16:06:23,16:10:34,10:10:34,
5,1004,堀江 克如,男,40-44男子,6:00:00,6:32:54,7:06:35,7:10:08,10:09:35,12:38:32,12:58:45,13:25:22,13:29:32,13:50:21,14:17:19,14:21:3
@matsubo
matsubo / main.js
Created August 14, 2024 02:27
Tried to crawl https://openai.com/news/ but blocked with 403 error.
// For more information, see https://crawlee.dev/
import { PlaywrightCrawler } from 'crawlee';
const userAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36';
// PlaywrightCrawler crawls the web using a headless
// browser controlled by the Playwright library.
const crawler = new PlaywrightCrawler({
// Use the requestHandler to process each of the crawled pages.
User-agent: GPTBot
Disallow: /
User-agent: ChatGPT-User
Disallow: /
User-agent: Google-Extended
Disallow: /
User-agent: CCBot

APC upsd mackerel plugin

Screenshot

image

Setup

@matsubo
matsubo / gist:cb875c98b3fd740abb24dd9f8f33d8a0
Created May 19, 2024 03:13
mysql 8.4に対応するためにパスワードのプラグインを変更する方法
# dockerコンテナの場合は手動で立ち上げて、そのコンテナにexecで入ってローカルに接続して変更する
ALTER USER 'root'@'localhost' IDENTIFIED with caching_sha2_password BY 'xxxxxxxxx'
ALTER USER 'root'@'%' IDENTIFIED with caching_sha2_password BY 'xxxxxxxxx'
@matsubo
matsubo / gist:dadcfc7554bc62855352b899bf5a7348
Created May 15, 2024 21:55
Delete all article using wp-cli.
$ wp post list| awk '{print $1} '| xargs -n 1 -I XXX wp post delete XXX --force
@matsubo
matsubo / gist:ac31be9578834db85e034ac54c0b433f
Created January 21, 2024 15:05
install nodejs oneliner on Ubuntu or Debian
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && apt-get install -y nodejs
@matsubo
matsubo / commit-msg
Created January 17, 2024 13:01 — forked from iberianpig/commit-msg
IssueID_xxxxなブランチ名の時に自動でコミットメッセージの先頭に[#IssueID]を付与するrubyスクリプト
#!/usr/bin/env ruby
message_file = ARGV[0]
message = File.read(message_file, :encoding => Encoding::UTF_8)
# remove prefix issue number like [#1234] from COMMIT_EDITMSG
message = message.sub(/^\[#[0-9A-Za-z_].*\]/, "")
# remove comment
message = message.gsub(/^#(?! ------------------------ >8 ------------------------).*\n|^\n/, "")
@matsubo
matsubo / autofill.js
Last active December 16, 2023 17:23
法人番号検索API サンプルコード
document.getElementById('s').addEventListener('keyup', async (e) => {
if (e.key !== 'Enter') return;
const s = e.target.value;
const corporateInfoUrl = `https://corporation.teraren.com/corporations.json?s=${s}`;
try {
const corporateResponse = await fetch(corporateInfoUrl);
const { items: [corporateData] } = await corporateResponse.json();