A(本地计算机) <-> B(跳板服务器) <-> C(git repo仓库所在服务器)
我想要通过B来代理A发送给C的git clone请求而不是用ssh-agent转发。为什么A不直接向C发起请求呢?通常是出于安全或下载速度上的考虑,对于中文用户而言,一般都是GFW(笑,梯子还是没有ssh tunneling裸奔快。
A(本地计算机) <-> B(跳板服务器) <-> C(git repo仓库所在服务器)
我想要通过B来代理A发送给C的git clone请求而不是用ssh-agent转发。为什么A不直接向C发起请求呢?通常是出于安全或下载速度上的考虑,对于中文用户而言,一般都是GFW(笑,梯子还是没有ssh tunneling裸奔快。
| # macos | |
| pbcopy < file.txt | |
| # win | |
| clip < file.txt | |
| # linux | |
| # install xclip | |
| xclip -sel clip < file.txt |
| # reference https://stackoverflow.com/questions/16956810/how-do-i-find-all-files-containing-specific-text-on-linux | |
| ## 1. grep | |
| grep -rnw '/path/to/somewhere/' -e 'pattern' | |
| ## 2. ack | |
| ack 'text-to-find-here' | |
| ## 3. grep with find | |
| find . -name '*.js' -exec grep -i 'string to search for' {} \; -print | |
| # or | |
| find . -type f -exec grep -l "Apache License" {} \; |
| [Unit] | |
| Description=devdocs in raspberry pi | |
| [Service] | |
| Type=simple | |
| SyslogIdentifier=devdocs-pi | |
| User=root | |
| WorkingDirectory=/home/pi/devdocs/ | |
| PIDFile=/home/pi/devdocs.pid | |
| Environment=BUNDLE_GEMFILE=/home/pi/devdocs/Gemfile |
| # -r recursively | |
| # -n line number | |
| # -w match whole word | |
| # -e perl pattern | |
| grep -rnw '\path\to\directory' -e 'perl_pattern' | |
| # good question: https://stackoverflow.com/questions/16956810/how-do-i-find-all-files-containing-specific-text-on-linux |
Just like another script for jupyter notebook.
bash nohup rvm install 2.6.5 >./info.out 2>./err.out &
| # Usage: combined with rm / cp / xargs / ... using pipe | |
| # Find files with specific name e.g. foo and print them | |
| find . -name "foo" -print | |
| # Find files with specific types e.g. directories | |
| find . -type d -print | |
| # Find files under specific path e.g ~/foo/ | |
| find . -path "~/foo/*" -print |
People
:bowtie: |
😄 :smile: |
😆 :laughing: |
|---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
| nohup jupyter notebook --allow-root > error.log 2>&1 & echo $! > notebook_pid.txt | |
| # add --no-browser if run as a jupyter notebook server | |
| nohup jupyter notebook --allow-root --no-browser> error.log 2>&1 & echo $! > notebook_pid.txt | |
| # reference https://stackoverflow.com/questions/17385794/how-to-get-the-process-id-to-kill-a-nohup-process |
| SYSCALL_DEFINE3(setnice,pid_t,pid,int,flag,int,nicevalue) | |
| { | |
| int errono = 0; | |
| struct pid * temp_pid=find_get_pid(pid); | |
| struct task_struct *p=pid_task(temp_pid,PIDTYPE_PID); | |
| if(p->pid != pid) | |
| { | |
| errono=-EFAULT; | |
| return errono; | |
| } |