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
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
"unicode/utf8" | |
) | |
const letterBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" |
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
(rsync -avtP -e "ssh -p 2222" /var/repo/ arloor@192.168.5.200:/share/CACHEDEV1_DATA/repo/ &) |
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
# 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 |
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
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] |
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
<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); | |
} |
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
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) { |