Skip to content

Instantly share code, notes, and snippets.

View wnoguchi's full-sized avatar
😀

Wataru Noguchi wnoguchi

😀
View GitHub Profile
@gwillem
gwillem / ansible-bootstrap-ubuntu-16.04.yml
Created June 16, 2016 21:59
Get Ansible to work on bare Ubuntu 16.04 without python 2.7
# Add this snippet to the top of your playbook.
# It will install python2 if missing (but checks first so no expensive repeated apt updates)
# gwillem@gmail.com
- hosts: all
gather_facts: False
tasks:
- name: install python 2
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
@giovtorres
giovtorres / virt-install-centos
Last active March 15, 2023 09:57
Install CentOS cloud images on KVM using cloud-init
#!/bin/bash
## **Updates to this file are now at https://github.com/giovtorres/kvm-install-vm.**
## **This updated version has more options and less hardcoded variables.**
# Take one argument from the commandline: VM name
if ! [ $# -eq 1 ]; then
echo "Usage: $0 <node-name>"
exit 1
fi
@makinuk
makinuk / capistrano.md
Last active September 18, 2019 17:17
Capistrano Configuration with Gitlab

Capistrano Configuration

Configure Server

  • configure deploy user
groupadd deployers
adduser deploy
usermod -a -G deployers deploy
  • to give the deployers group the permissions, run the following and edit the /etc/sudoers file: visudo
@chinshr
chinshr / Jenkinsfile
Last active October 16, 2023 09:25
Best of Jenkinsfile, a collection of useful workflow scripts ready to be copied into your Jenkinsfile on a per use basis.
#!groovy
# Best of Jenkinsfile
# `Jenkinsfile` is a groovy script DSL for defining CI/CD workflows for Jenkins
node {
}
@dlangille
dlangille / m
Created September 6, 2015 12:52
bacula can't label
*m
06-Sep 11:54 bacula-dir JobId 216721: Created new Volume="FullAuto-4875", Pool="FullFile", MediaType="File" in catalog.
06-Sep 11:54 bacula-dir JobId 0: Max configured use duration=86,400 sec. exceeded. Marking Volume "TwoHourly-4395" as Used.
06-Sep 11:54 crey-sd JobId 216721: Warning: mount.c:212 Open of file device "vDrive-3" (/usr/local/bacula/volumes) Volume "FullAuto-4875" failed: ERR=file_dev.c:172 Could not open(/usr/local/bacula/volumes/FullAuto-4875,OPEN_READ_WRITE,0640): ERR=No such file or directory
06-Sep 11:54 crey-sd JobId 216721: Warning: mount.c:212 Open of file device "vDrive-3" (/usr/local/bacula/volumes) Volume "FullAuto-4875" failed: ERR=file_dev.c:172 Could not open(/usr/local/bacula/volumes/FullAuto-4875,OPEN_READ_WRITE,0640): ERR=No such file or directory
06-Sep 11:54 crey-sd JobId 216721: Warning: mount.c:212 Open of file device "vDrive-3" (/usr/local/bacula/volumes) Volume "FullAuto-4875" failed: ERR=file_dev.c:172 Could not open(/usr/local/bacula/volumes/FullAuto-4875,OPEN_READ
@hgn
hgn / tcpdump IPv6 router advertisement
Created March 16, 2015 18:59
Capture of IPv6 advertisement message via tcpdump
@virgo:~ $ sudo tcpdump -vvvv -ttt -i eth1 icmp6 and 'ip6[40] = 134'
00:00:00.000000 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 200) fe80::b675:eff:fefa:1cb > ip6-allnodes: [icmp6 sum ok] ICMP6, router advertisement, length 200
hop limit 0, Flags [managed, other stateful], pref medium, router lifetime 1800s, reachable time 0s, retrans time 0s
source link-address option (1), length 8 (1): b4:75:0e:fa:01:cb
0x0000: b475 0efa 01cb
mtu option (5), length 8 (1): 1280
0x0000: 0000 0000 0500
prefix info option (3), length 32 (4): 2a01:ffff:43f::/64, Flags [onlink, auto], valid time 7200s, pref. time 1800s
0x0000: 40c0 0000 1c20 0000 0708 0000 0000 2a01
0x0010: ffff 043f 0000 0000 0000 0000 0000
@billzhuang
billzhuang / bulk-remove-sharing.js
Last active November 19, 2022 06:08
Google Apps script to bulk remove default sharing in Google Drive
/**
* Google Apps has some admin restriction, such as sharing to whole group by default
* this script can remove all sharing and reset to private only
* For more information on interacting with folders, see
* https://developers.google.com/apps-script/reference/drive/folder
* Github gist is here: https://gist.github.com/billzhuang/43faa0a8daea8f0dab74
*/
// step 1, prepare data in excel
function prepareData(){
@sonots
sonots / fluentd_hacking_guide.md
Last active August 30, 2021 05:57
Fluentd ソースコード完全解説 (v0.10向け)

Fluentd ソースコード完全解説

英題:Fluentd Hacking Guide

目次

30分しかないため斜線部分は今回省く

  • Fluentd の起動シーケンスとプラグインの読み込み
  • Fluentd の設定ファイルのパース
  • Input Plugin から Output Plugin にデータが渡る流れ
@wnoguchi
wnoguchi / .tmux.conf
Last active August 29, 2015 14:05
Main dotfiles.
#key
set-option -g prefix C-s
unbind-key C-b
bind-key C-s send-prefix
bind s split-window -v
bind v split-window -h
bind j select-pane -D
bind k select-pane -U
bind h select-pane -L
bind l select-pane -R
@YungSang
YungSang / 00-README.md
Last active August 29, 2023 21:03
CoreOS とその関連技術に関するここ半年間の私の活動まとめ

CoreOS とその関連技術に関するここ半年間の私の活動まとめ

はじめに

最近、社内で私が「何者で何をしているのか見えないので可視化して欲しい」という案件が出ているらしいので、ヘコヘコと徒然なるままに書いていきたいと思うのであります。

社内向けというだけでなく社外の人にも発信出来る内容に、との仕様も要求され、社外向けには出来るだけ旬なネタで、かつ、社内向けにはそれを理解する上で必要な関連する技術を個々に触れながら基礎知識が無くても理解出来るように、との追加仕様も提示されております。

で、何をネタにしてどのように書けばいいのか迷った訳ですが、自分が実際にやって来た内容である CoreOS であればそこそこ旬であるし、それをおさらいしつつ、関連技術も Docker、Omaha、systemd、BtrFS、Golang、etcd、Kubernetes 等々多岐にわたるので、それらに関して私見も含めてわかりやすく書ければいいかなぁと、とりあえず書き始めようとしている次第であります。