Skip to content

Instantly share code, notes, and snippets.

View jiahut's full-sized avatar
🎯
Focusing

zhijia,.zhang jiahut

🎯
Focusing
View GitHub Profile
package main
import (
"bufio"
"fmt"
"log"
"net"
"time"
)
@jiahut
jiahut / code.md
Created January 3, 2020 06:39 — forked from gopalindians/code.md
Jetbrains IntelliJ IDEA 2019.2.4 Activation code

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

CATF44LT7C-eyJsaWNlbnNlSWQiOiJDQVRGNDRMVDdDIiwibGljZW5zZWVOYW1lIjoiVmxhZGlzbGF2IEtvdmFsZW5rbyIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IklJIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiQUMiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJEUE4iLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJQUyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiRE0iLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJDTCIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJTMCIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJDIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiUkQiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJQQyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJNIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiV1MiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJEQiIsI

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()
/**
* 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 = [
[
@jiahut
jiahut / surfingkeys-vim.setting
Last active October 2, 2023 06:30
surfingkeys settings
// 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
@jiahut
jiahut / duplication.rb
Created November 13, 2020 16:24
find duplication emacs-mode
#!/bin/ruby
# ls_1 = `ls -1`
# all = []
# ls_1.each do | mode |
# mode =~ /((\w|-)+?)-((\d+|\.)+)/
# end
@jiahut
jiahut / [email protected]
Created December 24, 2020 07:42
turbovnc systemd 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 / xmodmap.sh
Created January 5, 2021 10:06
linux modify keyboard to hhkb style
#!/bin/sh
/usr/bin/setxkbmap -option "ctrl:nocaps"
/usr/bin/xmodmap -e "keycode 51 = BackSpace"
/usr/bin/xmodmap -e "keycode 22 = backslash bar"