Skip to content

Instantly share code, notes, and snippets.

@katabame
katabame / 00_project-moved.md
Last active May 18, 2024 06:15
Build Hyprland on Ubuntu 23.10

Maintaing gist file is kinda hard way, so I moved this project to katabame/Ubuntu-Hyprland repository.
future updates are only available at the repository.
and any issue or improvements are should be go to the repository's issue or pullrequest.

#!/bin/bash
build-from-nothing () {
sudo apt-get install -y --no-install-recommends \
meson wget build-essential ninja-build cmake-extras cmake \
gettext gettext-base fontconfig libfontconfig-dev libffi-dev \
libxml2-dev libdrm-dev libxkbcommon-x11-dev libxkbregistry-dev \
libxkbcommon-dev libpixman-1-dev libudev-dev libseat-dev seatd \
libxcb-dri3-dev libvulkan-dev libvulkan-volk-dev \
@katabame
katabame / configuration.nix
Created September 18, 2023 06:25
NixOS configuration
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
#!/bin/bash
BAR_SIZE=40
BAR_CHAR_DONE='#'
BAR_CHAR_TODO='-'
BAR_PERCENTAGE_SCALE=2
show_progress() {
CURRENT=$1
TOTAL=$2
version: '3'
services:
homeassistant:
container_name: homeassistant
image: "ghcr.io/home-assistant/home-assistant:stable"
volumes:
- /var/lib/homeassistant/config:/config
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
privileged: true
@katabame
katabame / 1.boot-debian.txt
Last active January 25, 2023 23:04
Debian on QEMU on Termux CheetSheet
~ $ pkg upgrade -y
~ $ pkg install screen qemu-utils qemu-common qemu-system-x86_64-headless -y
~ $ mkdir debian && cd $_
~/debian $ screen
~/debian $ qemu-img create -f qcow2 debian.img 4G
~/debian $ qemu-system-x86_64 -nographic -m 4G -hda debian.img
< PRESS Ctrl+B quickly >
iPXE> dhcp net0
iPXE> kernel http://ftp.jaist.ac.jp/debian/dists/stable/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux console=ttyS0
< Keep in mind, Backspace key doesn't work well. Use Delete key instead. >
pkg update && pkg install qemu-utils qemu-common qemu-system-x86_64-headless
mkdir alpine && cd $_
wget http://dl-cdn.alpinelinux.org/alpine/v3.12/releases/x86_64/alpine-virt-3.12.3-x86_64.iso
qemu-img create -f qcow2 alpine.img 4G
qemu-system-x86_64 -machine q35 -m 2048 -smp cpus=2 -cpu qemu64 \
-drive if=pflash,format=raw,read-only=on,file=$PREFIX/share/qemu/edk2-x86_64-code.fd \
-netdev user,id=n1,hostfwd=tcp::2222-:22 -device virtio-net,netdev=n1 \
-cdrom alpine-virt-3.12.3-x86_64.iso \
-nographic alpine.img
echo "deepin-wm --replace > /dev/null 2>&1 < /dev/null &" >> ~/.profile
sudo apt update
sudo apt upgrade -y
sudo apt install fcitx fcitx-mozc -y
sudo apt purge ibus
sudo apt install dconf-cli -y
dconf write /com/deepin/dde/sound-effect/desktop-login false
dconf write /com/deepin/dde/sound-effect/desktop-logout false
@katabame
katabame / tweetdeck.twitter.com.css
Created May 19, 2019 17:48
bring back old tweetdeck style
@-moz-document domain("tweetdeck.twitter.com")
{
:root
{
/* Change this var to adjust width */
--column-width: 270px;
}
/* Tweet composer */
@katabame
katabame / fastest_arrest.js
Last active September 5, 2020 15:02
多分これが一番はやいと思います。
for(;;)alert()