Skip to content

Instantly share code, notes, and snippets.

View k-oguma's full-sized avatar
:octocat:
( ̄(工) ̄)

oguma k-oguma

:octocat:
( ̄(工) ̄)
View GitHub Profile
@k-oguma
k-oguma / dns-bench1.sh
Created February 3, 2017 07:42
DNS Benchmark (Child forks + Parallel support)
#!/bin/sh
set -m
hostname="ns1"
domain="example.local"
target_dns="dns-unbound01"
query_count=3
forks=200
@k-oguma
k-oguma / ansible_init-role
Last active January 30, 2017 10:08
Ansibleでplaybooks整理: custom role path を使う場合のgroup_vars, host_vars の自動読み込みtask の一部抜粋 (https://github.com/aim-oguma/ansible-init-for-integrated/blob/master/tasks/main.yml)
---
- name: Ansible version check
command: ansible --version
register: ansible_version
delegate_to: 127.0.0.1
changed_when: False
- block:
- name: Read group_vars and host_vars. In addition, add the secret files.
include_vars: ../{{ item.group_or_host }}_vars/{{ item.type }}.yml
@k-oguma
k-oguma / sample-Vagrantfile
Last active December 22, 2016 07:46
Sample Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# サンプルです。このままでは動かないところがあります。
require 'net/http'
VAGRANTFILE_API_VERSION = "2"
@vb_gui = false
@vb_memory = 2048
@vb_cpus = 1
@k-oguma
k-oguma / math.py
Created March 11, 2016 10:27
Pythonで計算
# -*- coding: utf-8 -*-
# 3/8 と3/5の数値を * 7掛けして表示させる
# 合計を出す
# 平均値を出す
access_num = { '3/8': 1028, '3/5': 1542}
avg = 0
sum = 0
num = 7