Skip to content

Instantly share code, notes, and snippets.

View kaitoii11's full-sized avatar
:octocat:

Kaito Ii kaitoii11

:octocat:
  • Hewlett Packard Enterprise
  • Tokyo
  • X @a_aw_wq
View GitHub Profile
@kaitoii11
kaitoii11 / Dockerfile
Created February 20, 2021 05:26
Dockerfile to build libsbmlsim with Java binding
FROM openjdk:8-jdk as libsbmlsim
ENV LD_LIBRARY_PATH /usr/lib64
RUN apt update && \
apt -y upgrade && \
apt install -y cmake g++ libbz2-dev swig wget && \
wget -q http://downloads.sourceforge.net/project/sbml/libsbml/5.19.0/stable/Linux/64-bit/libSBML-5.19.0-Linux-x64.deb && \
dpkg -i libSBML-5.19.0-Linux-x64.deb
@kaitoii11
kaitoii11 / credential.tfvars
Created March 11, 2019 05:59
Terraform example
access_key = "<ACCESS KEY>"
secret_key = "<SECRET KEY>"
@kaitoii11
kaitoii11 / example.json
Created March 11, 2019 05:56
packer + terraform example
{
"variables": {
"aws_access_key": "",
"aws_secret_key": ""
},
"builders": [
{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
# InnoDB change log size
- innodb_fast_shutdownが2に設定されている場合は1に設定
`mysql> SET GLOBAL innodb_fast_shutdown = 1;`
- シャットダウンし、正常終了することを確認
- ログファイルを削除`/var/lib/mysql/ib_logfile*`
- MySQL/MariaDBを再起動
# python swift-proxy-check-with-request.py PROXY-IP
import requests
import json
import sys
import re
j = { "auth" : {\
"passwordCredentials" : {\
"username" : "<username>",\

/etc/haproxy/haproxy.cfg

#---------------------------------------------------------------------
# Example configuration for a possible web application.  See the
# full configuration options online.
#
#   http://haproxy.1wt.eu/download/1.4/doc/configuration.txt
#
#---------------------------------------------------------------------
@kaitoii11
kaitoii11 / vcenter-api.md
Last active February 29, 2024 17:27
Sample on how to use vCenter API
  • Authenticate to vCenter to get user credential.
# curl -k -X POST https://<FQDN or IP>/rest/com/vmware/cis/session -u <USERNAME>:<PASSWORD> | jq
{
  "value": "SESSIONID"
}
  • Save the session id to a variable
# ID=SESSIONID
@kaitoii11
kaitoii11 / install-docker.md
Last active October 21, 2017 11:00
Install docker on CentOS 7

How to install and run docker as general user

Install docker

$ sudo yum install docker

Add user to group dockerroot

$ sudo gpasswd -a $USER dockerroot
@kaitoii11
kaitoii11 / install-crowi.md
Last active September 15, 2017 14:26
Install [Crowi](https://github.com/crowi/crowi) on CentOS with Elasticsearch and MongoDB

Install Crowi on CentOS with Elasticsearch and MongoDB

Environment

$ cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)

Intall Node.js to CentOS7

$ sudo yum install -y epel-release
$ sudo yum group install "Development Tools"

$ curl --fail -sSL -o setup-nodejs https://rpm.nodesource.com/setup_6.x