This file contains hidden or 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
// ==UserScript== | |
// @name 微博 转跳时间轴 | |
// @namespace Violentmonkey Scripts | |
// @match https://weibo.com/* | |
// @grant none | |
// @version 1.0 | |
// @author - | |
// @description 微博首页转跳到自定义分组(根据时间排序查看微博) | |
// ==/UserScript== | |
(function() { |
This file contains hidden or 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/sh | |
D:/path/to/your.bat |
This file contains hidden or 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 | |
# https://stackoverflow.com/a/67658259/1265727 | |
# solve:The source and destination cannot both be remote. | |
# rsync error: syntax or usage error (code 1) at main.c(1428) [Receiver=3.2.7] | |
export MSYS_NO_PATHCONV=1 | |
wsl rsync -azhP raspi:/home/pi/www/ /mnt/z/backup/www | |
This file contains hidden or 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
# https://leetcode.com/problems/n-queens/submissions/ | |
class Solution: | |
def solveNQueens(self, n: int) -> List[List[str]]: | |
queen = [0]*(n+1) | |
# print(queen) | |
result = [] | |
def Place(y): | |
for x in range(1,y): | |
if queen[x] == queen[y] or (abs(queen[x]-queen[y]) == (y-x)): | |
return 0 |
This file contains hidden or 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
""" | |
https://stackoverflow.com/a/33436061/1265727 | |
""" | |
from contextlib import closing | |
from socket import socket, AF_INET, SOCK_DGRAM | |
import struct | |
import time | |
NTP_PACKET_FORMAT = "!12I" | |
NTP_DELTA = 2208988800 # 1970-01-01 00:00:00 |
This file contains hidden or 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 unittest | |
import requests | |
right_referer = 'https://xx.com' | |
img_url = "https://i.xx.com/f54ae2eb228d7.jpg" | |
content_length = 16714 | |
AntiTheft_content_length = 41 | |
class TestAntiTheft(unittest.TestCase): | |
""" |
This file contains hidden or 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 openpyxl import Workbook | |
from openpyxl.styles import PatternFill | |
from PIL import Image | |
import sys | |
''' | |
require: python3 pillow openpyxl | |
usage: python3 img2excel 1.jpg out | |
''' |
This file contains hidden or 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
HTTP/1.1 200 OK | |
Content-Type: text/html; charset=UTF-8 | |
Server: netcat! | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>A webpage served by netcat</title> |
This file contains hidden or 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
ls | nc 167.71.123.237 8999 |
This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
int main(){ | |
char f0[] = "/\\\n||^-----------\n||^###########|\n||^###########|\n||^###########|\n||^-----------\n|| \n||\n||\n||"; | |
char f1[] = "/\\\n||-^----------\n||#^##########|\n||#^##########|\n||#^##########|\n||-^----------\n|| \n||\n||\n||"; | |
char f2[] = "/\\\n||--^---------\n||##^#########|\n||##^#########|\n||##^#########|\n||--^---------\n|| \n||\n||\n||"; | |
char f3[] = "/\\\n||---^--------\n||###^########|\n||###^########|\n||###^########|\n||---^--------\n|| \n||\n||\n||"; | |
char f4[] = "/\\\n||----^-------\n||####^#######|\n||####^#######|\n||####^#######|\n||----^-------\n|| \n||\n||\n||"; |
NewerOlder