Skip to content

Instantly share code, notes, and snippets.

View naa0yama's full-sized avatar

Naoki Aoyama naa0yama

View GitHub Profile
@naa0yama
naa0yama / authorization
Last active October 25, 2017 23:50
MacBook で Yubikey 環境を作る ref: http://qiita.com/FoxBoxsnet/items/712b6d37147bf780f43e
auth required /usr/local/lib/security/pam_yubico.so mode=challenge-response
{
"twitter": {
"mappings": {
"twitter": {
"properties": {
"record": {
"properties": {
"created_at": {
"type": "text",
"fields": {
@naa0yama
naa0yama / twiter-streaming-api.json
Created October 5, 2017 02:49
Twitter API: Tweet data dictionaries
{
"created_at": "Wed Aug 27 13:08:45 +0000 2008",
"id": 114749583439036416,
"id_str": "114749583439036416",
"text": "Tweet Button, Follow Button, and Web Intents javascript now support SSL http://t.co/9fbA0oYy ^TS",
"source": "Twitter for Mac",
"truncated": true,
"in_reply_to_status_id": 114749583439036416,
"in_reply_to_status_id_str": "114749583439036416",
"in_reply_to_user_id": 819797,
#cloud-config
hostname: host001
rancher:
docker:
engine: docker-1.12.6
services:
console:
environment:
TZ: 'JST-9'
#cloud-config
rancher:
network:
http_proxy: https://myproxy.example.com
https_proxy: https://myproxy.example.com
no_proxy: localhost,127.0.0.1
@naa0yama
naa0yama / file0.txt
Created September 14, 2017 15:35
RancherOS で インストール後パスワードでログインする方法 ref: http://qiita.com/FoxBoxsnet/items/127354c03b55a161a35b
[rancher@host-192-168-0-44 ~]$ cat <<EOF > cloud-config.yml
hostname: ros003
EOF
[rancher@host-192-168-0-44 ~]$ cat cloud-config.yml
hostname: ros003
@naa0yama
naa0yama / bash
Created September 6, 2017 06:09
docker pull -a <image name> やってしまった. ref: http://qiita.com/FoxBoxsnet/items/d6cf4e95fdae1e596066
% docker images | grep -e '^nginx'
nginx 1.12-perl 088b0900b170 5 weeks ago 146MB
nginx 1.12.1-perl 088b0900b170 5 weeks ago 146MB
nginx stable-perl 088b0900b170 5 weeks ago 146MB
nginx 1.12 7f1c878a4833 5 weeks ago 107MB
nginx 1.12.1 7f1c878a4833 5 weeks ago 107MB
nginx stable 7f1c878a4833 5 weeks ago 107MB
nginx
@naa0yama
naa0yama / bash
Last active August 17, 2017 13:33
CloudGarage 早速いじってみた - Part.03 サーバー作成 & ベンチマーク ref: http://qiita.com/FoxBoxsnet/items/859723042dae238ac2d2
root@ubuntu01:~# dd if=/dev/zero of=/tmp/write.tmp ibs=1M obs=1M count=1024 && rm /tmp/write.tmp
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 1.03311 s, 1.0 GB/s
root@ubuntu01:~# dd if=/dev/zero of=/tmp/write.tmp ibs=1M obs=1M count=2048 && rm /tmp/write.tmp
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 2.17298 s, 988 MB/s
root@ubuntu01:~# dd if=/dev/zero of=/tmp/write.tmp ibs=1M obs=1M count=4096 && rm /tmp/write.tmp
4096+0 records in
@naa0yama
naa0yama / README.md
Last active August 6, 2017 05:13
Appliance Automatic Installation Ubuntu

ハンズオン & 検証用 Ubuntu Server 16.04.2 LTS 半自動構築スクリプト

この設定ファイルでは、preseed を使用して、初期設定をするスクリプトになってます。

Users 

  • ID: root, user01
  • PASS: p@ssw0rd

Packages

  • bash-completion
@naa0yama
naa0yama / KUSANAGI Upgrading certbot-auto 0.12.0 to 0.13.0...
Created April 9, 2017 13:19
KSUANAGI で 深夜のCRON実行がエラーした時のログ
Message 11:
From [email protected] Sun Apr 9 03:12:06 2017
Return-Path: <[email protected]>
X-Original-To: root
Delivered-To: [email protected]
From: "(Cron Daemon)" <[email protected]>
To: [email protected]
Subject: Cron <root@www> /usr/bin/kusanagi update cert
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated