-
首先启动一个Git Bash窗口(非Windows用户直接打开终端)
-
执行:
cd ~/.ssh
如果返回“… No such file or directory”,说明没有生成过SSH Key,直接进入第4步。否则进入第3步备份!
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
from socket import * | |
import datetime,os,struct,time,sys | |
# Script to set Linux hardware clock (/usr/sbin/hwclock) from an NTP | |
# time server. Run as "setclock.py" to simply print the time from | |
# the NTP server. Run as "setclock.py --set" to set the Linux | |
# hardware clock (as the super user, of course). | |
# Based on Simon Foster's simple SNTP client from ASPN Python cookbook. | |
# Adapted by Paul Rubin; this script lives at: | |
# http://www.nightsong.com/phr/python/setclock.py |
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
# -*- coding: utf-8 -*- | |
import socket,sys,time | |
#时间服务器 | |
host = "stdtime.gov.hk" | |
#端口 | |
port = 37 | |
#时区 | |
curtz = 8 | |
#连接服务器,并接收返回 | |
try: |