Skip to content

Instantly share code, notes, and snippets.

View rapirent's full-sized avatar

Kuo-Teng Ding rapirent

  • National Taiwan University
  • Taipei
View GitHub Profile
@rapirent
rapirent / update-podman.sh
Last active September 28, 2025 13:04 — forked from shvchk/update-podman.sh
Update podman to 5.3 on Ubuntu 22.04 jammy
#! /usr/bin/env bash
set -euo pipefail
echo 'deb http://archive.ubuntu.com/ubuntu/ plucky main universe' > /etc/apt/sources.list.d/plucky.list
echo 'deb http://archive.ubuntu.com/ubuntu/ plucky-proposed universe' >> /etc/apt/sources.list.d/plucky.list
cat > /etc/apt/preferences.d/podman.pref << EOF
Package: podman buildah golang-github-containers-common
Pin: release n=plucky-proposed
Pin-Priority: 990

Setup nut and netdata on Ubuntu

In this document, I will explain how to setup nut (Network UPS Tools) on Ubuntu 18.04 and 20.04.

It is basically the next chapter of my previous gist, Upgrade nut on Ubuntu 18.04.

I'll only document USB connected UPS and not the other supported connection modes.

Install required dependencies

@rapirent
rapirent / multiple_ssh_setting.md
Created August 18, 2021 13:45 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@rapirent
rapirent / download_LUNA16.sh
Created December 4, 2019 05:26
This will download the data for LUNA16 challange and unpack the files correctly
# If you find any mistakes in the script, write me an e-mail: viktor(at)tiulp.in
#
# This script is for linux-based systems.
#
# Warning: Do not mind the headers error when using p7zip with the subsets, it's normal here
#
# After the execution of the script, the data will be located in the described structure:
# ------------------------------------------------------------------------------------------
# ./ -- your project directory
# - evaluationScript/ -- the directory with the script for evaluation of your model
@rapirent
rapirent / unpack.sh
Created November 18, 2019 03:27 — forked from markusfisch/unpack.sh
bash script to extract archives always in a directory
#!/usr/bin/env bash
# Unpack archive safely (means always in its own directory
#
# @param 1 - name and path of archive to extract
function unpack()
{
local ARCHIVE=$1
local TMP=".unpack-$USER-$$"
local NAME=${ARCHIVE##*/}
@rapirent
rapirent / fcitx-chewing.png
Created November 8, 2019 11:17 — forked from tanyuan/fcitx-chewing.png
Ubuntu: fcitx + chewing 新酷音輸入法
fcitx-chewing.png
@rapirent
rapirent / .BASH-PROMPT.png
Created November 6, 2019 14:48 — forked from kfcobrien/.BASH-PROMPT.png
Clean informative bash prompt with git info
.BASH-PROMPT.png
@rapirent
rapirent / .bashrc
Created November 6, 2019 14:45 — forked from fragmuffin/.bashrc
Bash command prompt PS1
#... portion of .bashrc
export GIT_PS1_SHOWDIRTYSTATE=true # staged '+', unstaged '*'
export GIT_PS1_SHOWUNTRACKEDFILES=true # '%' untracked files
export GIT_PS1_SHOWUPSTREAM="auto" # '<' behind, '>' ahead, '<>' diverged, '=' no difference
export GIT_PS1_SHOWSTASHSTATE=true # '$' something is stashed
function __prompt_command() {
local ERRORCODE="$?"
@rapirent
rapirent / git-aware-bash-prompt.md
Created November 6, 2019 14:04 — forked from eliotsykes/git-aware-bash-prompt.md
Git Aware Bash Prompt

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: