Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

zhijia,.zhang jiahut

🎯
Focusing
View GitHub Profile
@jiahut
jiahut / vim_cheatsheet.md
Created January 13, 2022 08:08 — forked from awidegreen/vim_cheatsheet.md
Vim shortcuts
View vim_cheatsheet.md

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
View editor-mode.org

editor-mode

motion-mode

conceptkeyvim implemacs impl
snipes
matchit%matchup
jump<SPC>ojeasymotionavy
gotogf
@jiahut
jiahut / xmodmap.sh
Created January 5, 2021 10:06
linux modify keyboard to hhkb style
View xmodmap.sh
#!/bin/sh
/usr/bin/setxkbmap -option "ctrl:nocaps"
/usr/bin/xmodmap -e "keycode 51 = BackSpace"
/usr/bin/xmodmap -e "keycode 22 = backslash bar"
@jiahut
jiahut / turbovnc-service@1.service
Created December 24, 2020 07:42
turbovnc systemd service
View turbovnc-service@1.service
[Unit]
Description=TurboVNC vncserver
After=network.target syslog.target
[Service]
User=ubuntu
Type=forking
ExecStartPre=/bin/sh -c '/opt/TurboVNC/bin/vncserver -kill :1 &>/dev/null || :'
ExecStart=/opt/TurboVNC/bin/vncserver -nohttpd -nthreads 8 -nevershared -disconnect -deferupdate 1 -idletimeout 0 -interframe -depth 24 -name zhijia-cloud-vnc :1
ExecStop=/bin/sh -c '/opt/TurboVNC/bin/vncserver -kill :1 &>/dev/null || :'
@jiahut
jiahut / duplication.rb
Created November 13, 2020 16:24
find duplication emacs-mode
View duplication.rb
#!/bin/ruby
# ls_1 = `ls -1`
# all = []
# ls_1.each do | mode |
# mode =~ /((\w|-)+?)-((\d+|\.)+)/
# end
@jiahut
jiahut / surfingkeys-vim.setting
Last active May 22, 2023 10:00
surfingkeys settings
View surfingkeys-vim.setting
// vim: set syntax=typescript:
// an example to create a new mapping `ctrl-y`
// mapkey('<Ctrl-y>', 'Show me the money', function() {
// Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).');
// });
// an example to replace `T` with `gt`, click `Default mappings` to see how `T` works.
// map('gt', 'T');
//reference
View pac.txt
/**
* genpac 2.1.0 https://github.com/JinnLynn/genpac
* Generated: 2020-03-08 22:43:53
* GFWList Last-Modified: 2019-11-05 00:21:47
* GFWList From: online[https://raw.githubusercontent.com/gfwlist/gfwlist/master/gfwlist.txt]
*/
var proxy = 'SOCKS5 127.0.0.1:10860';
var rules = [
[
View vimrc
call plug#begin('~/.vim/plugged')
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
let g:fzf_layout = { 'window': { 'width': 0.8, 'height': 0.6 } }
call plug#end()
@jiahut
jiahut / code.md
Created January 3, 2020 06:39 — forked from gopalindians/code.md
Jetbrains IntelliJ IDEA 2019.2.4 Activation code
View code.md

Please make fork of this, as this can be removed by Github.com sooner or later.

CATF44LT7C-eyJsaWNlbnNlSWQiOiJDQVRGNDRMVDdDIiwibGljZW5zZWVOYW1lIjoiVmxhZGlzbGF2IEtvdmFsZW5rbyIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IklJIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiQUMiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJEUE4iLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJQUyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiRE0iLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJDTCIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJTMCIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJDIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiUkQiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJQQyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJNIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiV1MiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJEQiIsI

View 04-uuid.md