- HTTP 形式:
git clone https://github.com/owner/git.git
- SSH 形式:
git clone [email protected]:owner/git.git
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BAD_RES_STATE | 0x25B161 | destroy_ctx - context doesn't exist or doesn't match type | |
BAD_RES_STATE | 0x4A6FC9 | destroy_ctx - context in use | |
BAD_RES_STATE | 0x60DA55 | destroy_dct - dct not in drained state | |
BAD_PARAM | 0x67A6F2 | slrg doesnt support write; | |
BAD_PARAM | 0x0F0E35 | ppamp doesnt support write; | |
BAD_PKT | 0x4A22F | access reg MAD with specified register id not supported | |
BAD_PKT | 0x16C592 | mad_ifc: process_smp_lid mkey check failed - silently discarded | |
INTERNAL_ERR | 0x079233 | set_get_port_info: silently discarded. | |
BAD_PKT | 0x468496 | mad_ifc: ATTRV_SM_INFO handled by SW | |
BAD_PKT | 0x071808 | mad_ifc: smp trap repress silently discarded after processing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 96 core at most | |
calc_rps_cpus() | |
{ | |
local cpu_ids=$(echo $@ | sort) | |
local h=0 | |
local m=0 | |
local l=0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://cloud.tencent.com/developer/article/1631874 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! s:send2ssh() | |
if has("nvim") | |
let ch = sockconnect('tcp', '127.0.0.1:22222') | |
if ch == 0 | |
echomsg "failed to connect 127.0.0.1:22222" | |
endif | |
call chansend(ch, getreg('"')) | |
call chanclose(ch) | |
else | |
let ch = ch_open('127.0.0.1:22222') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to setup? | |
1. local: add sshconfig to your ~/。ssh/config | |
2. local: copy pbcopy.plist to HOME/Library/LaunchAgents/ and load it with: | |
launchctl load -w $HOME/Library/LaunchAgents/pbcopy.plist | |
3. remote: add vimrc to your remote server's vim config file ~/.vimrc | |
4. remote: copy pbcopy to your remote server and make it excutable | |
chmod +x /usr/local/bin/pbcopy | |
5. remote: run vim and yank | |
6. local: paste the yanked content |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Generate a password hash, suitable for /etc/shadow | |
Inspired by this code from OpenStack: | |
https://github.com/openstack/nova/blob/stable/grizzly/nova/virt/disk/api.py#L549 | |
Usage: | |
mkpasswd <passwd> [--algo=<hash>] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import re | |
import sys | |
import sqlite3 | |
import zhconv | |
book_name_map = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if grep -q pypi.pdcts.com.cn /etc/hosts; then | |
sed -i "/pypi.pdcts.com.cn/ d" /etc/hosts | |
fi | |
echo "10.1.1.2 pypi.pdcts.com.cn" >> /etc/hosts | |
mkdir -p ~/.pip/ | |
touch ~/.pip/pip.conf |
This is an example of a socket-activated per-connection service (which is usually referred to as inetd-like service). A thorough explanation can be found at http://0pointer.de/blog/projects/inetd.html.
The key point here is to specify Accept=yes
, which will make the socket accept connections (behaving like inetd) and pass
only the resulting connection socket to the service handler.
NewerOlder