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.
  • Tokyo Japan
  • 08:36 (UTC +09:00)
View GitHub Profile
@takehaya
takehaya / prevent_screensaver.py
Created December 13, 2024 17:31
勝手にスクリーンセイバーが動いてしまうのを阻止するためにプログラム。3時間マウスを触らなかったらこのプログラムは落ちるように設計されてる
import time
import Quartz.CoreGraphics as CG
def get_mouse_position():
"""現在のマウス位置を取得"""
current_pos = CG.CGEventGetLocation(CG.CGEventCreate(None))
return (current_pos.x, current_pos.y)
def move_mouse():
"""マウスを一時的に動かして戻す"""
@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