Skip to content

Instantly share code, notes, and snippets.

View iydon's full-sized avatar
📚
Focusing

Iydon Liang iydon

📚
Focusing
View GitHub Profile
@iydon
iydon / main.srt
Last active May 27, 2020 18:53
【程序】多语言来回翻译《让子弹飞》片段
1
00:00:35,233 --> 00:00:37,028
自宣统皇帝退位以后
2
00:00:38,067 --> 00:00:40,294
鹅城一共来过51任县长
3
00:00:40,499 --> 00:00:44,795
@iydon
iydon / main.js
Created June 10, 2020 21:23
哔哩哔哩自动点赞收藏
var favorite_title = '三连用收藏夹-1';
var interval = 30; // second
var delay = 2; // second
function sleep (time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
setInterval(() => {
import copy
class S2F:
def __init__(self, name='_'):
self._name = name
def __call__(self, args, body):
_ = locals()
exec('def {}({}):\n\t{}'.format(self._name, args, body.replace('\n', '\n\t')))
@iydon
iydon / app.py
Created July 9, 2020 14:24
MD5 存储服务
sqlite_path = 'data.sqlite'
import os
from datetime import datetime, date, time
from time import localtime, time as now
from sqlalchemy import Column, Integer, String, Date, Time, create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
@iydon
iydon / tinypng.py
Created July 12, 2020 21:37
TinyPNG – Compress PNG images while preserving transparency
import os
import pathlib
import shutil
import subprocess
import tempfile
import warnings
def tinypng(input_path, output_path):
'''TinyPNG – Compress PNG images while preserving transparency
@iydon
iydon / test_asterisk_and_ampersand.cpp
Last active September 24, 2020 02:26
C++ 中 * 和 & 的个人习惯尝试(不喜欢过于简洁的符号来表示内容,容易产生歧义)
#include <iostream>
#define pointer(x) *x
#define address(x) &x
#define refer(x) &x
using namespace std;
void swap(int refer(x), int refer(y)) {
@iydon
iydon / macOS.html
Last active April 1, 2023 18:37
Fake Windows and macOS Update Screens
<!DOCTYPE html>
<html>
<head>
<style>
body {
background: #000 no-repeat center center fixed;
margin: 0;
cursor: none;
}
@iydon
iydon / alphabet.py
Created November 30, 2020 13:52
转换英文至不同风格或字体
class Alphabet:
'''字母表
Reference:
- http://www.fileformat.info/info/charset/UTF-8/list.htm
'''
def __init__(self):
self._alphabets = dict()
self._add('latin_capital_letter', 0x41, 0x41)
self._add('latin_small_letter', 0x61, 0x61)
@iydon
iydon / im2text.py
Created December 4, 2020 02:55
命令行展示图片
'''requirements.txt
opencv_python==4.2.0.34
prompt_toolkit==3.0.5
'''
import cv2
import itertools
import math
import os
import prompt_toolkit
@iydon
iydon / csgo.cfg
Last active October 26, 2023 07:30
CS:GO configuration
unbindall
bind "0" "slot10"
bind "1" "slot1"
bind "2" "slot2"
bind "3" "slot3"
bind "4" "slot4"
bind "5" "slot5"
bind "6" "slot6"
bind "7" "slot7"
bind "8" "slot8"