Skip to content

Instantly share code, notes, and snippets.

@QinMing
QinMing / git_profile.sh
Last active April 8, 2022 00:35
My git configurations, mainly alias. Just need to run it once.
#!/bin/bash
git config --global user.name "Ming Qin"
git config --global user.email "$email_address"
git config --global push.default current
git config --global alias.l "log --stat --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %C(blue)(%an %ch)%Creset%n' --abbrev-commit"
git config --global alias.last "log -1 HEAD"
git config --global alias.a "add"
git config --global alias.b "branch -v --sort=committerdate"
git config --global alias.c "commit"
@QinMing
QinMing / Ubuntu Remote Desktop.md
Last active December 3, 2015 01:05
Ubuntu Remote Desktop

This can be done. Following are the steps to setup the GUI

Create new user with password login. (But a new user is actually not needed)

sudo useradd -m awsgui
sudo passwd awsgui
sudo usermod -aG admin awsgui
sudo vim /etc/ssh/sshd_config # edit line "PasswordAuthentication" to yes
sudo /etc/init.d/ssh restart
syntax on
filetype plugin indent on
" show existing tab with xx spaces width
set tabstop=4
" when indenting with '>', use xx spaces width
set shiftwidth=4
" On pressing tab, insert xx spaces
set expandtab
" Enable mouse use in all modes. So that when ssh into here, can use mouse to activate visual mode
@QinMing
QinMing / bash_profile
Last active July 19, 2016 07:19
.bash_profile or .profile
# Ming's .bash_profile
# -- Less is better
# function cd() {
# if [ $# -gt 0 ]; then
# builtin cd "$*" && ls
# else
# builtin cd && ls
# fi
# }