Instantly share code, notes, and snippets.

View tello.js
#!/usr/bin/env node
'use strict'
const PORT = 8889;
const HOST = [
View tello.js
#!/usr/bin/env node
'use strict'
const PORT = 8889;
const HOST = '';
const dgram = require('dgram');
const client = dgram.createSocket('udp4');
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']

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.

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



  • インフラコストがかからないこと。
  • 特定の誰かに権限が集中しないこと。
  • すべてが公開された場所に残ること。(たとえば閲覧する際に認証とが必要ないこと。パーマリンクがあって後から参照しやすいこと。)
  • オープンソースコミュニティっぽい方法であること。「オープンソースっぽい」は毎日進化してます。
View file0.txt
$ composer require symfony/dom-crawler symfony/css-selector --dev
#!/usr/bin/env bash
set -ex
sudo apt update -y
sudo apt install \
View jpegoptim.php
add_filter( 'wp_image_editors', function( $editors ) {
if ( ! class_exists( '_WP_Image_Editor_GD' ) ) {
class _WP_Image_Editor_GD extends WP_Image_Editor_GD {
protected function _save( $image, $filename = null, $mime_type = null ) {
$saved = parent::_save( $image, $filename, $mime_type );
if ( ! empty( $saved["mime-type"] ) && 'image/jpeg' == $saved["mime-type"] ) {
jpegoptim( $saved['path'] );
View features.diff
diff --git a/features/bootstrap/FeatureContext.php b/features/bootstrap/FeatureContext.php
index aaf39713..ae0adb9d 100644
--- a/features/bootstrap/FeatureContext.php
+++ b/features/bootstrap/FeatureContext.php
@@ -1,14 +1,14 @@
use Behat\Behat\Context\ClosuredContextInterface,
- Behat\Behat\Context\TranslatedContextInterface,
- Behat\Behat\Context\BehatContext,