Skip to content

Instantly share code, notes, and snippets.

View yude's full-sized avatar

Takehiro Ogura yude

  • Internet Initiative Japan Inc.
  • Chiba, Japan
  • 10:54 (UTC +09:00)
View GitHub Profile
@shun-shobon
shun-shobon / README.md
Last active January 12, 2025 07:18
Hide private address on Amazon
@niw
niw / README.en.md
Last active March 30, 2025 06:00
How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

Here is easy steps to try Windows 10 on ARM or Ubuntu for ARM64 on your Apple Silicon Mac. Enjoy!

NOTE: that this is current, 10/1/2021 state.

Running Windows 10 on ARM

  1. Install Xcode from App Store or install Command Line Tools on your Mac
@puhitaku
puhitaku / moji_emoji_stroke.py
Created November 5, 2020 09:49
透明背景に黒一色なPNG文字絵文字をちょっと縮小して白フチ付けるやつ
# Runs on Python 3.8 + Pillow
# Should run also on Python 3.7+
from pathlib import Path
from PIL import Image, ImageOps, ImageFilter
def main():
Path('./stroked').mkdir(exist_ok=True)
@kujiy
kujiy / Dockerfile
Last active April 7, 2022 13:09
Dockerfile for Nginx with custom modules
FROM alpine:3.10.1
LABEL maintainer "Adrian B. Danieli - https://github.com/sickp"
EXPOSE 80 443
CMD ["nginx", "-g", "daemon off;"]
ENV NGINX_VERSION 1.19.1
RUN set -ex \
@s417-lama
s417-lama / svg2pdf.bash
Created April 29, 2020 07:18
Reliable way to convert an SVG file to a PDF file using headless Chrome
#!/bin/bash
#
# Convert an SVG file to a PDF file by using headless Chrome.
#
if [ $# -ne 2 ]; then
echo "Usage: ./svg2pdf.bash input.svg output.pdf" 1>&2
exit 1
fi
@acj
acj / microk8s_in_lxc.md
Last active March 17, 2025 08:22
Installing microk8s in an LXC container

Installing microk8s in an LXC container

I wanted to run Microk8s on a Proxmox 6 host inside of an LXC container. These are my notes from the journey.

  1. Create a privileged LXC container through the Proxmox web interface
  • Enable nesting and FUSE
    • In Proxmox UI, select container, then Options > Features > Check nesting and FUSE boxes
  1. SSH into the Proxmox host and edit the container's config in /etc/pve/lxc/.conf
    • Add the following lines
  • lxc.apparmor.profile: unconfined
@petamoriken
petamoriken / h2o.conf.yaml
Last active February 25, 2022 06:52
partial of h2o config files for mastodon
http2-casper: ON
compress: ON
header.setifempty: "X-XSS-Protection: 1; mode=block"
header.setifempty: "Expect-CT: max-age=2592000, enforce"
header.setifempty: "Expect-Staple: max-age=31536000; includeSubDomains; preload"
listen:
port: 80
#include "sleepy-discord/include/sleepy_discord/websocketpp_websocket.h"
class MyClientClass : public SleepyDiscord::DiscordClient {
public:
using SleepyDiscord::DiscordClient::DiscordClient;
void onMessage(SleepyDiscord::Message message) override {
if (message.content.find("Fuck")!=std::string::npos&&message.author.username!="時雨谷") sendMessage(message.channelID, "Go to hell " + message.author.username);
if (message.content.find("遊ぼう")!=std::string::npos&&message.author.username!="時雨谷") sendMessage(message.channelID, "遊ぼう");
if (message.content.find("馬鹿")!=std::string::npos&&message.author.username!="時雨谷") sendMessage(message.channelID, "馬鹿");
if (message.content.find("もう遊ばない")!=std::string::npos&&message.author.username!="時雨谷") sendMessage(message.channelID, "遊ばない");
@uru2
uru2 / scan_ch_mirak.sh
Last active October 22, 2024 11:29
Mirakurun/mirakcチャンネル設定出力
#!/bin/sh
# Mirakurun/mirakc channel yaml output by uru (https://twitter.com/uru_2)
#
# require:
# stz2012/epgdump
# xmllint (libxml2 tools)
# ISDB-T/S record software
# recpt1, dvbv5-zap & Chinachu/dvbconf-for-isdb
set -eu
@tsunyan
tsunyan / エクスプローラ周り重い人向け覚書.bat
Last active January 18, 2025 17:55
エクスプローラ周り重い人向け覚書
@rem 「※※※」は私のコメントです(元増田のコメントではありません)
@rem エクスプローラ周り重い人向け覚書
@rem https://anond.hatelabo.jp/20191116220232
@rem ■ システム設定
@rem Windows Defender自身を検索して無限ループに陥る問題を解消する
@rem - 設定→更新とセキュリティ→Windows セキュリティ→ウイルスの驚異の防止
@rem - ウイルスと驚異の防止の設定→設定の管理