:w !diff % -
import time
from datetime import datetime
import pytz
In [14]: t = datetime.fromtimestamp(1546751128, pytz.timezone('Asia/Shanghai')).strftime('%Y-%m-%d %H:%M:%S')
In [15]: t
Out[15]: '2019-01-06 13:05:28'
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 http.server import HTTPServer, BaseHTTPRequestHandler | |
from socketserver import ThreadingMixIn | |
class Handler(BaseHTTPRequestHandler): | |
protocol_version = 'HTTP/1.1' | |
def do_GET(self): | |
rsp = b'GET' | |
self.send_response(200) | |
self.send_header('Content-Length', len(rsp)) |
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
#include <iostream> | |
#include "curl/curl.h" | |
int main() { | |
curl_version_info_data* ver = curl_version_info(CURLVERSION_NOW); | |
std::cout << ver->ssl_version << std::endl; | |
return 0; | |
} |
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
#!/bin/bash | |
setxkbmap -option caps:none | |
xmodmap -e "keycode 66 = End NoSymbol End NoSymbol End" | |
xmodmap -e "keycode 112 = BackSpace BackSpace BackSpace BackSpace" | |
NewerOlder