Skip to content

Instantly share code, notes, and snippets.

Avatar
🐌

刘港欢 arloor

🐌
View GitHub Profile
@arloor
arloor / mo.py
Last active Mar 17, 2021
树莓派摄像头
View mo.py
# Web streaming example
# Source code from the official PiCamera package
# http://picamera.readthedocs.io/en/latest/recipes2.html#web-streaming
import io
import picamera
import logging
import socketserver
from threading import Condition
from http import server
@arloor
arloor / addr.py
Last active Jul 21, 2020
python3利用udp获取域名地址
View addr.py
import socket
def dns_query(domain):
addr = None
with socket.socket(type=socket.SOCK_DGRAM) as s:
try:
s.connect((domain, 80))
addr = s.getpeername()
return addr[0]
@arloor
arloor / index.html
Created May 28, 2020
markdown编辑器
View index.html
<div>
<textarea id="textBox" oninput="mark()" cols=50 rows=10></textarea>
</div>
<div id="content">
</div>
<script>
function mark(){
document.getElementById('content').innerHTML = marked(document.getElementById('textBox').value);
}
View JAVA-MD5,sha1,sha256;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Scanner;
import org.apache.commons.codec.binary.Hex;
/**
* 常見的几种加密方式
*/
public class Encrypt {
public static void main(String[] args) {