Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# Run KVM with iPXE boot
mkdir -p /var/kvm/distros/ubuntu-server-22.04/
virt-install --pxe \
--boot uefi \
--name ubuntu-desktop-22.04 \
--connect=qemu:///system \
--vcpus=2 \
--memory 16384 \
@TsutomuNakamura
TsutomuNakamura / happy_birthday_toki.sh
Created May 25, 2019 04:26
Run platform-display for Toki's happy birthday!
#!/usr/bin/env bash
bash -- <(curl -o- https://raw.githubusercontent.com/TsutomuNakamura/platform-display/master/index.sh 2> /dev/null) 'Happy birthday Toki!'
@TsutomuNakamura
TsutomuNakamura / Dockerfile
Last active November 8, 2018 09:00
Dokerfile for mediawiki with LaTeX
# https://hub.docker.com/_/mediawiki/
FROM mediawiki:latest
# Change the repository location of the repository for people who lives in Japan.
RUN VAR=$(grep -E '^deb .*' /etc/apt/sources.list | head -1 | awk '{print $3}') && \
echo "deb http://ftp.jp.debian.org/debian/ stretch ${VAR} main contrib non-free" > /etc/apt/sources.list && \
echo "deb http://ftp.jp.debian.org/debian ${VAR}-updates main contrib" >> /etc/apt/sources.list
# https://www.mediawiki.org/wiki/Extension:Math/advancedSettings#Installing_texvc
RUN apt-get update && \
@TsutomuNakamura
TsutomuNakamura / rsync_lxc_container.sh
Last active March 29, 2023 16:59
Rsync an LXC container
rsync --archive --compress --partial --append --delete --numeric-ids \
--exclude=/rootfs/cdrom/* --exclude=/rootfs/dev/* --exclude=/rootfs/media/* --exclude=rootfs/mnt/* \
--exclude=/rootfs/proc/* --exclude=/rootfs/run/* --exclude=/rootfs/sys/* --exclude=/rootfs/tmp/* \
/var/lib/lxc/${container}/ user@desthost:/var/lib/lxc/${container}
@TsutomuNakamura
TsutomuNakamura / KDEShortcuts_RunCommand_KWin.txt
Created March 25, 2018 12:25
KDE のショートカット。System Settings -> Shortcuts からインポートする
[krunner][Global Shortcuts]
run command=Meta+R; Alt+F2
run command on clipboard contents=Alt+Shift+F2
[kwin][Global Shortcuts]
Activate Window Demanding Attention=Ctrl+Alt+A
Decrease Opacity=none
Expose=Ctrl+F9
ExposeAll=Ctrl+F10; Launch (C)
ExposeClass=Ctrl+F7
@TsutomuNakamura
TsutomuNakamura / InstallDockerInUbuntu.sh
Last active March 25, 2018 12:19
Ubuntu にリポジトリから最新のDocker をインストールする
#!/bin/bash -eu
# Reference https://docs.docker.com/engine/installation/ubuntulinux/
[ "$(id -u)" != "0" ] && echo "You must run this script as root." && exit 1
. /etc/os-release
[ "${NAME,,}" != "ubuntu" ] && echo "Sorry, this script doesn't support the distribution $NAME" && exit 1
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
. /etc/lsb-release
echo "deb https://apt.dockerproject.org/repo ubuntu-${DISTRIB_CODENAME,,} main" > /etc/apt/sources.list.d/docker.list
@TsutomuNakamura
TsutomuNakamura / IBMPowerKVM
Last active March 25, 2018 12:14
あらゆるLinux にKVMをインストールする ref: http://qiita.com/TsutomuNakamura/items/bb5cd1bcbf1b998941ed
http://www-01.ibm.com/support/knowledgecenter/linuxonibm/liabo/liabokickoff.htm