Skip to content

Instantly share code, notes, and snippets.

View takehaya's full-sized avatar
🏠
Working from home

Takeru Hayasaka takehaya

🏠
Working from home
  • BBSakura Networks, Inc.
  • Kyoto Japan
  • 22:06 (UTC +09:00)
View GitHub Profile
@takehaya
takehaya / pokemon_wallpapers.sh
Created May 29, 2023 07:35
ポケモンシャツのスマホ壁紙データを全部持ってくるやつ
mkdir -p ~/Downloads/pokemon_wallpapers/ && seq 1 493 | xargs -I {} wget -P ~/Downloads/pokemon_wallpapers/ https://os-cdn.ec-ffmt.com/jp/pokemon/dedicate/wallpaper/{}.jpg
@takehaya
takehaya / cml2exabgp.yaml
Last active March 22, 2023 03:04
cml2のubuntuでcloudinitを行う際にexabgpとfrrをインストールしておく例です。鍵はいい感じに好きなのに変えておいて使ってください
#cloud-config
hostname: exabgp1
manage_etc_hosts: True
timezone: Asia/Tokyo
system_info:
default_user:
name: cisco
password: cisco
chpasswd: { expire: False }
ssh_pwauth: True
@takehaya
takehaya / exabgp_mup.md
Last active May 18, 2023 00:55
Usage of exabgp BGP-MUP Support
// ==UserScript==
// @name Remove Twitter Deck Card
// @namespace https://twitter.com/takemioIO
// @version 0.0.1
// @description Remove the twitter views link from people's tweets
// @author takemioIO
// @match https://tweetdeck.twitter.com/*
// @icon https://static.thenounproject.com/png/1159224-200.png
// @license MIT
// ==/UserScript==

multipass に関するメモ

tags: back of ads

インストール

# mac install
brew install --cask multipass

チートシート兼VMの起動まで

#/bin/sh
# install dependencies for building iproute2
sudo apt update
DEBIAN_FRONTEND=noninteractive sudo apt upgrade -y
sudo apt install -y bison flex clang gcc llvm libelf-dev bc libssl-dev tmux trace-cmd
# update iproute2
sudo apt install -y pkg-config bison flex make gcc
cd /tmp
srv6_bpf.o: file format ELF64-BPF
Disassembly of section xdp_prog:
0000000000000000 srv6_handler:
; {
0: r6 = r1
; void *data_end = (void *)(long)xdp->data_end;
toor@router-01:~$ sudo ./vinbero
2021/01/04 19:20:37 program srv6_handler: load program: permission denied: func#0 @0
btf_vmlinux is malformed
Unrecognized arg#0 type PTR
0: R1=ctx(id=0,off=0,imm=0) R10=fp0
; int srv6_handler(struct xdp_md *xdp)
0: (bf) r6 = r1
1: R1=ctx(id=0,off=0,imm=0) R6_w=ctx(id=0,off=0,imm=0) R10=fp0
; void *data_end = (void *)(long)xdp->data_end;
1: (61) r2 = *(u32 *)(r6 +4)