- HTTP 形式:
git clone https://github.com/owner/git.git
- SSH 形式:
git clone [email protected]:owner/git.git
This file contains 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 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.
Add the following chunk to your existing ISC dhcpd.conf
file.
if exists user-class and ( option user-class = "iPXE" ) {
filename "http://boot.smidsrod.lan/boot.ipxe";
}
else {
filename "undionly.kpxe";
}
(or see https://gist.github.com/4008017 for a more elaborate setup
This file contains 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
user www-data; | |
worker_processes 4; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} |
- Add
pbcopy.plist
to your~/Library/LaunchAgents/
folder. - Launch the listener with
launchctl load ~/Library/LaunchAgents/pbcopy.plist
. - Add
RemoteForward 2224 127.0.0.1:2224
in your~/.ssh/config
file under yourHost *
or specific hosts sections. - Add
[ -n "$SSH_CLIENT" ] && alias pbcopy="nc localhost 2224"
to your remote~/.bash_profile
or other shell profile. - Enjoy
pbcopy
remotely!