Skip to content

Instantly share code, notes, and snippets.

View grammy-jiang's full-sized avatar
:octocat:
Do one thing, do it well

Grammy Jiang grammy-jiang

:octocat:
Do one thing, do it well
View GitHub Profile
@grammy-jiang
grammy-jiang / i3 setup.md
Last active June 18, 2022 15:14
i3 setup and configuration on Raspberry Pi 3
@grammy-jiang
grammy-jiang / docker sentry.md
Last active April 3, 2020 07:43
Docker Sentry
foo@bar:~$ docker run \
  --detach \
  --name sentry-redis \
  redis:alpine
foo@bar:~$ docker run \
  --detach \
  --name sentry-postgres \
  --env POSTGRES_PASSWORD=<password> \
  --env POSTGRES_USER=<username> \
@grammy-jiang
grammy-jiang / vimrc
Last active October 6, 2023 09:40
$HOME/.vimrc
" =========================================================================== "
" Github URL
" https://gist.githubusercontent.com/grammy-jiang/162f271c59a97a424d228f0de10d05e9/raw
" Shorten URL
" https://git.io/JvpSM
" =========================================================================== "
set encoding=utf-8
if empty(glob('~/.vim/autoload/plug.vim'))
@grammy-jiang
grammy-jiang / zsh configuration.sh
Last active January 7, 2023 14:36
zsh configuration
#!/usr/bin/env bash
echo "Install dependencies now..."
sudo -- sh -c "apt update && apt install -y curl fzf gawk git python3-pygments sqlite3 ssh-askpass wget zsh"
if [ -f ~/.zshrc ]; then
mv ~/.zshrc ~/.zshrc.`date +%s`.bak
fi
if [ -d ~/.oh-my-zsh ]; then
echo "Oh My ZSH exists, update it now..."
git -C ~/.oh-my-zsh pull
@grammy-jiang
grammy-jiang / .p10k.zsh
Last active November 1, 2020 23:32
.p10k.zsh
# Generated by Powerlevel10k configuration wizard on 2020-04-10 at 00:13 AEST.
# Based on romkatv/powerlevel10k/config/p10k-rainbow.zsh, checksum 08386.
# Wizard options: nerdfont-complete + powerline, small icons, rainbow, unicode,
# vertical separators, blurred heads, flat tails, 2 lines, disconnected, no frame,
# compact, many icons, concise, transient_prompt, instant_prompt=verbose.
# Type `p10k configure` to generate another config.
#
# Config for Powerlevel10k with powerline prompt style with colorful background.
# Type `p10k configure` to generate your own config based on it.
#
@grammy-jiang
grammy-jiang / id_rsa.pub
Last active April 26, 2020 08:21
public ssh key of grammy-jiang@lenovo-y510p
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAABAEAu8cFTKj4rAe00WX7dIMeP2F8MywdgJMhaGuH/E3CbCyKAgmd9NQ/v8gjh+bangiY8Z6XhyoxDr2gvcUhIJGKXgU5xobrjbSeLhURLX+dctH//1ZyjrwWKaBuD81P0byPIM3TU9r7FoAqinTFDtECOU8ou9y9VQEilJDomrElBbjar50Nab+vNvT1mv8Kx202/nj56I7nZ+h7iPbxZ9N0LeZTidG/pWxgv8E3AvExORWcRwqbbxB2N7QNGTvF34ygrMI0yI6HcrdOHMuyW8POC5E/dXfrr5JYjhMqzxGb0GhPzLorwmUQjvhkEFDsSOEczu6W7TnSYD7ssNuwU3E+xw8PikbhRSLglkxVUNyI4zYXjFZV4xQV8UdzChjGxgTKG51oLKwBIUImBmoeeNenw1tGRcp3eINTAglAcIEJVzjoyYWWNbpjjI8CrWL3mFd4kukoClNf1XysRYxzy0hUk12TKXgD8hBA9/GQmBtA6eby51MjVAot6zeKX66tCsYNDRt9QoUHjNmfqfshGbNOAhBXQ50QYM5QJBxZicqJVVTtkvhc4fwD9UjYz+qIL5ftorPOCzIAqL9gQhjX4xqH6NiBqDMYOVnSQLxgZj7ARGsQCyl6U6nLKkfcywK5fGPkqLJkAPPBF+KwFP0ggsOxhWlrpqw71L6KvTRERDIyktrlq+6QtlFmO28V340PXy4Xlb8jultCfJ/kqojt8bVNgbxJB2eAQIIZD5/6qoipcVvCcLchFuVeYYF6YH2z61OaX0SggDb23CzoaAKURmFv4eFzZSRr/9St30772r/vbdDQEX7cwdFocCVGwuCLovmWE+QTQ7ixF3Dof/Gslx37rs4BrntEaADT3IQEkXV06NTjMU3C6OVjUhGqqH8d6j/G+DxPjVCFTB7ouhyTMQBfyDgQSl4H3KFpxlxOTILOa8pQenzoBitGSwFYsCDXIIBVxe+S90b4MTdH98PQwDywlA+t7xyO
@grammy-jiang
grammy-jiang / pyenv and python install.sh
Last active November 21, 2025 01:31
Install pyenv and python 3.8.2
# Origianl url:
# https://gist.githubusercontent.com/grammy-jiang/bd07d16412b0f250063b703cf988190b/raw
# Shorten url:
# https://git.io/JfLCd
# install pyenv and python 3.9.6
# Usage:
# foo@bar:~$ curl --location --show-error --silent https://git.io/JfLCd | bash -s - 3.9.6
set -x
@grammy-jiang
grammy-jiang / ideavimrc
Last active November 19, 2023 04:54
$HOME/.ideavimrc
" ============================================================================ "
" URL Original: https://gist.github.com/grammy-jiang/3d4f9bab3bc2a94dc676f69310ff56ea/raw
" URL Shorten: https://git.io/JcVKE
"
" Usage:
" wget --output-document=$HOME/.ideavimrc https://git.io/JcVKE
" ============================================================================ "
set showcmd " show (partial) command in the status bar
@grammy-jiang
grammy-jiang / time configuration.md
Last active January 19, 2023 09:24
time configuration on Raspberry Pi with Ubuntu

Time Service

NTP

Server

foo@bar:~$ sudo apt install --yes ntp
#!/usr/bin/env bash
BITS=$(getconf LONG_BIT)
OS=$(lsb_release -si)
function add_repo() {
echo 'deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Raspbian_10/ /' | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Raspbian_10/Release.key | sudo apt-key add -
sudo apt-get update
}