Skip to content

Instantly share code, notes, and snippets.

View thiennn-neji's full-sized avatar

Thien Nguyen-Ngoc thiennn-neji

  • Vietnam
View GitHub Profile
@alejandro-martin
alejandro-martin / multiple-ssh-keys-git.adoc
Last active December 7, 2025 08:22
Configure multiple SSH Keys for Git

Use Multiple SSH Keys for Git host websites (Github, Gitlab)

This is guide about how to configure multiple SSH keys for some Git host websites such as Github, Gitlab, among others.

Creating SSH keys

  1. Create SSH directory:

@mattward
mattward / config
Last active November 16, 2022 10:01
Template for SSH config: ~/.ssh/config
################################################################################
# File: SSH client configuration
# Author: Matt Ward
################################################################################
Host wopr
HostName wopr.example.com
IdentityFile ~/.ssh/id_wopr
User mward
@u0d7i
u0d7i / disable_vim_auto_visual_on_mouse.txt
Last active November 11, 2025 18:23
Disable vim automatic visual mode on mouse select
Disable vim automatic visual mode on mouse select
issue: :set mouse-=a
add to ~/.vimrc: set mouse-=a
my ~/.vimrc for preserving global defaults and only changing one option:
source $VIMRUNTIME/defaults.vim
set mouse-=a
@polamjag
polamjag / arch-ja-ime.md
Created August 30, 2014 13:49
Using Japanese Input Method on Arch Linux (and some Arch-based distros) and some tips

I recommend fcitx-mozc for Japanese Input Method in Arch or Angergos, and I'm also using it. I think fcitx-mozc is better than ibus-mozc for some reasons. First one is that there are official binary package of fcitx-mozc, but ibus-mozc is only in AUR. Secondly, fcitx is more configurable than ibus.

Please see https://wiki.archlinux.org/index.php/Fcitx for way of installing and configuring fcitx.

After that, you can configure alternative keybind of "Zenkaku-Hankaku." Since I'm using US keyboard, I set C-\ (Control + \) for Zenkaku-Hankaku key. The option is at

"Configure" (at fcitx's menu, appears after right-clicking fcitx icon or run `fcitx-configtool` on terminal) > "Global Config" > "Trigger Input Method."

You can switch on or off to use input method with key on that config, or switch between all of installed input methods.

@codecats
codecats / gist:a67ed3997e1e1d898ade
Last active November 16, 2022 10:01
SSH config for ubuntu (File path: "/etc/ssh/ssh_config")
# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.
# Configuration data is parsed as follows:
# 1. command line options
# 2. user-specific file
# 3. system-wide file
# Any configuration value is only changed the first time it is set.
@thomasfr
thomasfr / iptables.sh
Last active November 17, 2025 22:18
iptable rules to allow outgoing DNS lookups, outgoing icmp (ping) requests, outgoing connections to configured package servers, outgoing connections to all ips on port 22, all incoming connections to port 22, 80 and 443 and everything on localhost
#!/bin/bash
IPT="/sbin/iptables"
# Server IP
SERVER_IP="$(ip addr show eth0 | grep 'inet ' | cut -f2 | awk '{ print $2}')"
# Your DNS servers you use: cat /etc/resolv.conf
DNS_SERVER="8.8.4.4 8.8.8.8"
# Allow connections to this package servers