Skip to content

Instantly share code, notes, and snippets.

View refresh-eks-nodegroup.sh
#!/bin/bash
termination_policy="OldestLaunchTemplate OldestInstance"
info(){
echo -e "\033[32m$(date +%Y-%m-%dT%H:%M:%S) $*\033[m"
}
usage(){
if [ $# -ge 1 ] ; then
View eks-node-replace.sh
#!/bin/bash
info(){
echo -e "\033[32m$(date +%Y-%m-%dT%H:%M:%S) $*\033[m"
}
usage(){
if [ $# -ge 1 ] ; then
echo $*
echo
@yteraoka
yteraoka / ubuntu.md
Last active May 4, 2020
ubuntu メモ
View ubuntu.md

package のインストール

ip

apt-get install -y iproute2

ping

@yteraoka
yteraoka / wordpress-with-vitess-error-log.txt
Created Feb 16, 2020
WordPress を Vitess で実行して Dashboard を表示した時のエラー
View wordpress-with-vitess-error-log.txt
[Sat Feb 15 16:05:59.792882 2020] [php7:warn] [pid 82] [client 172.17.0.1:57975] PHP Warning: mysqli_query(): Error reading result set's header in /var/www/html/wp-includes/wp-db.php on line 2030, referer: http://192.168.64.11:30803/wp-admin/
[Sat Feb 15 16:05:59.794799 2020] [php7:notice] [pid 82] [client 172.17.0.1:57975] WordPress \xe3\x83\x87\xe3\x83\xbc\xe3\x82\xbf\xe3\x83\x99\xe3\x83\xbc\xe3\x82\xb9\xe3\x82\xa8\xe3\x83\xa9\xe3\x83\xbc: Commands out of sync; you can't run this command now for query SELECT option_value FROM wp_options WHERE option_name = '_transient_feed_mod_992efac292246ae35bf235a03417a202' LIMIT 1 made by do_action('wp_ajax_dashboard-widgets'), WP_Hook->do_action, WP_Hook->apply_filters, wp_ajax_dashboard_widgets, wp_dashboard_primary, wp_dashboard_cached_rss_widget, wp_dashboard_primary_output, wp_widget_rss_output, fetch_feed, SimplePie->init, WP_Feed_Cache_Transient->save, set_transient, get_option, referer: http://192.168.64.11:30803/wp-admin/
[Sat Feb 15 16:05:59.795120 2020] [php
@yteraoka
yteraoka / nannohi.py
Last active Nov 1, 2019
Wikipedia から今日が何の日かを抽出
View nannohi.py
import random
import requests
from bs4 import BeautifulSoup
from datetime import date
today = date.today()
url = 'https://ja.wikipedia.org/wiki/{}月{}日'.format(today.month, today.day)
events = []
View mdns-client.go
package main
import (
"context"
"flag"
"log"
"time"
"strings"
"github.com/grandcat/zeroconf"
@yteraoka
yteraoka / tts.go
Created Aug 19, 2018
Google Cloud Text-to-Speech example
View tts.go
package main
// http://codegists.com/code/google-cloud-speech-example/
import (
"cloud.google.com/go/texttospeech/apiv1"
"context"
flags "github.com/jessevdk/go-flags"
texttospeechpb "google.golang.org/genproto/googleapis/cloud/texttospeech/v1"
"io/ioutil"
@yteraoka
yteraoka / kvm-host-dashboard.json
Created Aug 20, 2017
Grafana dashboard for KVM Host
View kvm-host-dashboard.json
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
@yteraoka
yteraoka / mysql-ha.txt
Created Jun 11, 2017
MySQL-HA-Cluster-on-CentOS7-using-DRBD
View mysql-ha.txt
https://www.lisenet.com/2016/activepassive-mysql-high-availability-pacemaker-cluster-with-drbd-on-centos-7/
http://clusterlabs.org/doc/it-IT/Pacemaker/1.1/html/Clusters_from_Scratch/ch07.html
http://elrepo.org/tiki/tiki-index.php
http://qiita.com/sion_cojp/items/a6a329df0415a843fb12
https://blog.3ware.co.jp/drbd-users-guide-8.3/s-configure-split-brain-behavior.html
View repmgrd-double-free-or-corruption.txt
/var/log/repmgr/repmgr-9.5.log
[2016-09-28 00:43:43] [ERROR] promote command failed. You could check and try it manually.
*** Error in `/usr/pgsql-9.5/bin/repmgrd': double free or corruption (out): 0x00000000008291c0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7cfe1)[0x7fced6cf9fe1]
/usr/pgsql-9.5/lib/libpq.so.5(+0xa7df)[0x7fced70487df]
/usr/pgsql-9.5/bin/repmgrd[0x409db3]
/usr/pgsql-9.5/bin/repmgrd[0x40db68]
/usr/pgsql-9.5/bin/repmgrd[0x40304a]
You can’t perform that action at this time.