Skip to content

Instantly share code, notes, and snippets.

View ueokande's full-sized avatar
🙆‍♀️
LGTM

Shin'ya Ueoka ueokande

🙆‍♀️
LGTM
View GitHub Profile
@ueokande
ueokande / sidecar-proxy-route-manager.sh
Last active March 2, 2021 08:00
Initialization script for AppMesh network by aws-appmesh-proxy-route-manager (v3-prod)
#!/bin/bash -e
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
@ueokande
ueokande / readme.txt
Last active October 31, 2019 03:33
Super autolink test (BUGZILLA-12345)
See, also KUBERNETES-8523, KUBERNETES-8575 and ETCD-1137
@ueokande
ueokande / readme.txt
Created October 30, 2019 22:24
Super autolink
See, also
@ueokande
ueokande / .bashrc
Created October 23, 2019 22:42
dot.separated.case <---> SNAKE_CASE
# Converts between dot.separated.case and SNAKE_CASE (app caps).
# dot.separated.case to SNAKE_CASE
#
# echo 'mysql.user' | dots_to_snake
# => MYSQL_USER
#
alias prop_to_env="tr '[a-z].' '[A-Z]_'"
# SNAKE_CASE to dot.separated.case
@ueokande
ueokande / 20190808.txt
Last active August 8, 2019 22:21
OpenJDK docker tags
10
10-ea
10-ea-32
10-ea-32-experimental
10-ea-32-jdk
10-ea-32-jdk-experimental
10-ea-32-jdk-slim
10-ea-32-jdk-slim-experimental
10-ea-32-jre
10-ea-32-jre-experimental
@ueokande
ueokande / script.sh
Created July 28, 2019 12:47
Create screenshot GIF
# Get window info
xwininfo
# Save screenshot animation as a PNG format into outputs
ffmpeg -video_size $widthx$height -framerate 24 -f x11grab -i :0.0+$x,$y outputs/%04d.png
# Generate GIF from PNG images
ffmpeg -y -i outputs/%04d.png -ss 2.3 -t 15 -filter_complex "[0:v]setpts=0.7*PTS,split [a][b];[a] palettegen [p];[b][p] paletteuse" screenshot.gif
struct Document<'a> {
fields: Vec<Box<Field + 'a>>,
}
impl<'a> Document<'a> {
fn new() -> Document<'a> {
Document { fields: Vec::new() }
}
fn add_field<T>(&mut self, field: T)
@ueokande
ueokande / main.go
Created June 6, 2019 04:50
Convert tab-splitted dictionaly to json
package main
import (
"bufio"
"encoding/json"
"errors"
"fmt"
"os"
"strings"
)
@ueokande
ueokande / start.sh
Created August 29, 2018 12:43
Screencast on Linux
sudo modprobe v4l2loopback
ffmpeg -video_size 3840x2160 -framerate 30 -f x11grab -i :0.0 -f v4l2 /dev/video0
@ueokande
ueokande / main.go
Created August 27, 2018 05:14
etcd test
package main
import (
"context"
"fmt"
"os"
"time"
"github.com/coreos/etcd/clientv3"
)