Skip to content

Instantly share code, notes, and snippets.

📡
I'm just learning the internet.

Moto Ishizawa summerwind

📡
I'm just learning the internet.
Block or report user

Report or block summerwind

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@summerwind
summerwind / README.md
Created May 30, 2018
Generic XDP on Ubuntu 18.04
View README.md

Generic XDP on Ubuntu 18.04

Start VM instance with Vagrant.

$ vagrant up
$ vagrant ssh

Install packages.

@summerwind
summerwind / python.sh
Created Jun 15, 2017
python command wrapper for Container Linux
View python.sh
#!/bin/sh
if [ "${CONTAINER}" = "1" ]; then
/usr/local/bin/python $@
else
docker run \
-it --rm \
-v /:/host \
-v /opt:/opt \
-v /home:/home \
@summerwind
summerwind / template.json
Last active Jun 17, 2019
Example of vboxmanage command in Packer template
View template.json
{
"builders": [
{
"type": "virtualbox-ovf",
"source_path": "ubuntu-16.04-server-cloudimg-amd64.ova",
"vboxmanage": [
["storageattach", "{{.Name}}", "--storagectl", "IDE", "--port", "0", "--device", "0", "--type", "dvddrive", "--medium", "files/cloud.iso"],
["modifyvm", "{{.Name}}", "--nic1", "nat" ],
["modifyvm", "{{.Name}}", "--uart1", "0x3F8", "4"],
["modifyvm", "{{.Name}}", "--uartmode1", "file", "console.log"]
@summerwind
summerwind / build-a-os-image-with-packer-and-qemu.md
Last active Oct 2, 2018
Build a OS image with Packer and QEMU
View build-a-os-image-with-packer-and-qemu.md

Build a OS image with QEMU and Ubuntu Cloud Image

Prerequirements

  • Packer
  • QEMU
  • Docker

Build an image of cloud-init settings

@summerwind
summerwind / h2sniff.py
Last active Feb 16, 2018
HTTP/2 frame sniffer
View h2sniff.py
#!/usr/bin/python
# This code is modified version of sslsniff.
# https://github.com/iovisor/bcc/blob/master/tools/sslsniff.py
#
# Licensed under the Apache License, Version 2.0 (the "License")
from __future__ import print_function
import ctypes as ct
from bcc import BPF
View keybase.md

Keybase proof

I hereby claim:

  • I am summerwind on github.
  • I am summerwind (https://keybase.io/summerwind) on keybase.
  • I have a public key ASATIxoWXCkM5L81IMSEDYZcOcVMlBNCpH3_qNuQdkes_wo

To claim this, I am signing this object:

@summerwind
summerwind / xdp_load_balancer.c
Last active Mar 7, 2019
XDP based load balancer with L3DSR support
View xdp_load_balancer.c
#define KBUILD_MODNAME "load_balancer"
#include <uapi/linux/bpf.h>
#include <linux/in.h>
#include <linux/if_ether.h>
#include <linux/if_packet.h>
#include <linux/if_vlan.h>
#include <linux/ip.h>
#include <linux/ipv6.h>
BPF_HASH(counter, uint32_t, long);
@summerwind
summerwind / README.md
Last active Jun 22, 2016
L3DSR Test Client
View README.md

L3DSR Test Client

This code is tested on Ubuntu 16.04.

Setup

Install scapy.

$ sudo apt-get install scapy
@summerwind
summerwind / kube-vagrant-setup.sh
Last active Sep 13, 2017
Kubernetes を Vagrant でセットアップするコマンド。
View kube-vagrant-setup.sh
export KUBERNETES_PROVIDER=vagrant
export KUBERNETES_MEMORY=2048
export NUM_MINIONS=2
export KUBE_LOGGING_DESTINATION=elasticsearch
export KUBE_ENABLE_CLUSTER_LOGGING=true
export KUBE_ENABLE_NODE_LOGGING=true
curl -sS https://get.k8s.io | bash
#cd kubernetes
#./cluster/kube-up.sh
@summerwind
summerwind / dump.md
Last active Sep 19, 2015
H2O のプロセスが暴走する
View dump.md

strace

epoll_wait(4, {{EPOLLERR|EPOLLHUP, {u32=12250816, u64=12250816}}}, 256, 49) = 1
epoll_wait(4, {{EPOLLERR|EPOLLHUP, {u32=12250816, u64=12250816}}}, 256, 49) = 1
epoll_wait(4, {{EPOLLERR|EPOLLHUP, {u32=12250816, u64=12250816}}}, 256, 49) = 1
epoll_wait(4, {{EPOLLERR|EPOLLHUP, {u32=12250816, u64=12250816}}}, 256, 49) = 1
epoll_wait(4, {{EPOLLERR|EPOLLHUP, {u32=12250816, u64=12250816}}}, 256, 49) = 1
epoll_wait(4, {{EPOLLERR|EPOLLHUP, {u32=12250816, u64=12250816}}}, 256, 49) = 1
epoll_wait(4, {{EPOLLERR|EPOLLHUP, {u32=12250816, u64=12250816}}}, 256, 49) = 1
epoll_wait(4, {{EPOLLERR|EPOLLHUP, {u32=12250816, u64=12250816}}}, 256, 49) = 1
You can’t perform that action at this time.