Skip to content

Instantly share code, notes, and snippets.

View TennousuAthena's full-sized avatar
🎯
Focusing

Takuenn Li TennousuAthena

🎯
Focusing
View GitHub Profile
import os
import random, time
import win32com.client
from ctypes import *
import win32api,win32con
screenX = win32api.GetSystemMetrics(win32con.SM_CXSCREEN)//1.1
screenY = win32api.GetSystemMetrics(win32con.SM_CYSCREEN)//1.1
started = False
@TennousuAthena
TennousuAthena / poetry.py
Created April 12, 2022 23:21
从hotokoto自动同步诗词到p.txt
#!/usr/bin/python3
import requests, os, time
while True:
url = "https://v1.hitokoto.cn/?c=i"
response = requests.get(url).json()
file = open('p.txt','w',encoding='utf-8')
file.write(response['hitokoto']+"\n"+response['from_who']+" 《"+response['from']+"》")
file.close()
print(response)
time.sleep(30)

Keybase proof

I hereby claim:

  • I am tennousuathena on github.
  • I am qctech (https://keybase.io/qctech) on keybase.
  • I have a public key ASBBAd5ZFNBbxvbAoswQxPC-wzHSda-EZeK1eNiqYiRhnQo

To claim this, I am signing this object:

@TennousuAthena
TennousuAthena / index-kv.js
Created August 24, 2021 14:01
Workers Image Url
const html404 = `<!DOCTYPE html>
<body>
<h1>404 Not Found.</h1>
<p>The url you visit is not found.</p>
</body>`;
const KEY = "ccccccvbddhvfhcldgvvjlcefnbihdngnfjhdbjekuic"
async function randomString(len) {
  len = len || 32;
@TennousuAthena
TennousuAthena / hitokoto.php
Created August 13, 2021 11:55
WP_Hitokoto
<?php
/**
* @package Hello_Hitokoto
* @version 1.0.1
*/
/*
Plugin Name: Hello Hitokoto
Plugin URI: https://gist.github.com/TennousuAthena/96bb33fedbd979ed64fb167d5c60d0c3
Description: 在管理界面添加一言
Author: TennousuAthena
@TennousuAthena
TennousuAthena / return_html.php
Created July 18, 2020 04:37
PHP SCF Quick Start
<?php
// main function, called by SCF
// 主函数,调用的入口
function main_handler($event, $context) {
// print parameters
// 进门打印传入参数是好习惯
echo 'event:'.json_encode($event, JSON_PRETTY_PRINT).'
context:'.json_encode($context, JSON_PRETTY_PRINT);
// echo $event->{'headers'}->{'host'} ; // parameter is object. 传入的参数是object
@TennousuAthena
TennousuAthena / TennousuAthena.gif
Last active June 14, 2020 14:19
咕咕咕现状
TennousuAthena.gif
@TennousuAthena
TennousuAthena / url_query.js
Created April 28, 2019 11:30
获取URL查询参数
q={};location.search.replace(/([^?&=]+)=([^&]+)/g,(_,k,v)=>q[k]=v);q;
//Done!
@TennousuAthena
TennousuAthena / qwq.gif
Last active May 4, 2020 20:25
你看我辣么可爱,给个Star好不好?
qwq.gif
@TennousuAthena
TennousuAthena / base64_folder.js
Created April 27, 2019 14:55
🔒Base64 encode the whole folder!
const fs = require('fs')
const path = require('path')
const base64 = v => Buffer.from(v).toString('base64')
const work = map => {
let base64Map = map.map(base64)
let here = path.join(...map)
let there = path.join(...base64Map)