Skip to content

Instantly share code, notes, and snippets.

Avatar
🐟
摸,都可以摸,摸了 _(:зゝ∠)_

✨小透明・宸✨ TransparentLC

🐟
摸,都可以摸,摸了 _(:зゝ∠)_
View GitHub Profile
@TransparentLC
TransparentLC / xoshiro128ss.js
Created Oct 23, 2020
可播种的随机数生成器 xoshiro128**
View xoshiro128ss.js
/**
* Random number generator "xoshiro128**".
* @see http://prng.di.unimi.it/xoshiro128starstar.c
*/
class Xoshiro128ss {
/**
* Init the RNG with given seed.
* The default seed is taken from current timestamp.
* @param {Number} [a]
* @param {Number} [b]
@TransparentLC
TransparentLC / stuhealth.py
Created Sep 7, 2020
半自动健康打卡机,请配合“计划任务” / Crontab 使用。PyInstaller 打包后的 Windows x64 版下载地址:https://bj.bcebos.com/im-cs/3496a165fef32f4fa9b3edda94f73d32.zip
View stuhealth.py
#!/usr/bin/python3
import base64
import json
import os
import time
try:
import requests
from Crypto.Cipher import AES
@TransparentLC
TransparentLC / lazyload.example.html
Last active Aug 4, 2020
部分参考 https://github.com/tuupola/lazyload 的图片懒加载插件,添加了自动选择 AVIF 和 WebP 格式的支持,本质上是在造轮子 2333
View lazyload.example.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script src="https://cdn.jsdelivr.net/gh/w3c/IntersectionObserver/polyfill/intersection-observer.min.js"></script>
@TransparentLC
TransparentLC / qsticker.py
Last active Jul 31, 2020
下载手机 QQ 的原创表情,使用方式:qsticker.py --emoticonid 203291 --destination /any/dir --zip
View qsticker.py
import argparse
import json
import os
import re
import requests
import requests.exceptions
import threading
import zipfile
from requests.models import Response
View alicdn_video_hosting_v2.ps1
#!/usr/bin/env pwsh
# https://stackoverflow.com/questions/8761888/capturing-standard-out-and-error-with-start-process
function Start-Command ([String]$Path, [String]$Arguments) {
$pinfo = New-Object System.Diagnostics.ProcessStartInfo
$pinfo.FileName = $Path
$pinfo.RedirectStandardError = $true
$pinfo.RedirectStandardOutput = $true
$pinfo.UseShellExecute = $false
$pinfo.Arguments = $Arguments
View MultiThreadDownload-File.ps1
function PartiallyDownload-File([String]$Uri, [String]$OutFile, [Int64]$Start, [Int64]$End = 0, [String]$UserAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36') {
[Net.ServicePointManager]::DefaultConnectionLimit = [Int32]::MaxValue
$Request = [Net.WebRequest]::Create($Uri)
if ($End) {
$Request.AddRange($Start, $End)
}
else {
$Request.AddRange($Start)
}
$Request.UserAgent = $UserAgent
View alicdn_video_hosting.ps1
#!/usr/bin/env pwsh
# https://stackoverflow.com/questions/8761888/capturing-standard-out-and-error-with-start-process
function Start-Command ([String]$Path, [String]$Arguments) {
$pinfo = New-Object System.Diagnostics.ProcessStartInfo
$pinfo.FileName = $Path
$pinfo.RedirectStandardError = $true
$pinfo.RedirectStandardOutput = $true
$pinfo.UseShellExecute = $false
$pinfo.Arguments = $Arguments
You can’t perform that action at this time.