Skip to content

Instantly share code, notes, and snippets.

Takayuki Miyauchi miya0001

Block or report user

Report or block miya0001

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
miya0001 / pi.js
Created Aug 19, 2019
Node + ピタゴラスの定理を使って円周率を計算する
View pi.js
#!/usr/bin/env node
const max = 1000000000;
let n = 6
let side1 = 0
let side2 = 1
let side3 = 1
#!/usr/bin/env bash
set -ex
curl -sL | sudo -E bash -
sudo apt-get install -y nodejs
sudo ln -s /usr/bin/nodejs /usr/local/bin/node
miya0001 / tello.js
Last active Dec 21, 2018
tello 編隊飛行
View tello.js
#!/usr/bin/env node
'use strict'
const PORT = 8889;
const HOST = [
miya0001 / tello.js
Last active Jan 30, 2019
Tello + Node.js example
View tello.js
#!/usr/bin/env node
'use strict'
const PORT = 8889;
const HOST = '';
const dgram = require('dgram');
const client = dgram.createSocket('udp4');
miya0001 / screenshot.js
Last active Aug 12, 2018
View screenshot.js
const puppeteer = require('puppeteer');
async function sleep(delay) {
return new Promise(resolve => setTimeout(resolve, delay));
(async () => {
const browser = await puppeteer.launch({
disable-gpu: true,
args: ['--no-sandbox']
miya0001 /
Last active Jun 25, 2018
Next generation of multibyte fix for WordPress

The length of the excerpt should be localizable.

We can make it localizable by adding number of the length into .po like following.

msgctxt "excerpt length"
msgid "40"

The length of the comment in dashboard should be localizable.

miya0001 /
Created Jun 24, 2018
Jekyll Markdown Example
layout title date categories
Welcome to Jekyll!
2015-11-17 16:16:01 -0600
jekyll update

You’ll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run bundle exec jekyll serve, which launches a web server and auto-regenerates your site when a file is updated.

To add new posts, simply add a file in the _posts directory that follows the convention YYYY-MM-DD-name-of-post.ext and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.

View gist:ccd63d44ba89e74fa7e8e88cfea92937



  • インフラコストがかからないこと。
  • 特定の誰かに権限が集中しないこと。
  • すべてが公開された場所に残ること。(たとえば閲覧する際に認証とが必要ないこと。パーマリンクがあって後から参照しやすいこと。)
  • オープンソースコミュニティっぽい方法であること。「オープンソースっぽい」は毎日進化してます。
miya0001 / file0.txt
Last active Apr 5, 2018
PHPUnitでHTMLをDOMでパースしてテスト ref:
View file0.txt
$ composer require symfony/dom-crawler symfony/css-selector --dev
miya0001 /
Last active Mar 21, 2018
Install PHP 5.6 into the VCCW
#!/usr/bin/env bash
set -ex
sudo apt update -y
sudo apt install \
You can’t perform that action at this time.