Skip to content

Instantly share code, notes, and snippets.

@0x401
0x401 / typecho2hexo.js
Created May 16, 2022 07:41
将 Typecho 文章转为 Hexo 格式
const mysql = require('mysql')
const fs = require('fs');
const moment = require('moment')
var con = mysql.createConnection({
host: "",
user: "",
password: "",
database: ""
});
@0x401
0x401 / typechoFontmin.js
Last active May 16, 2022 07:48
typecho fontmin
process.chdir('/root/fontmin/')
const Fontmin = require('fontmin')
const mysql = require('mysql')
const fs = require('fs');
var srcPath = './LXGWWenKai-Regular.ttf'// 字体源文件
var destPath = './out/' // 输出路径
var fix = '博客导航作者登录身份退出添加新评论杨枝甘露粉游暂时没有副标题'//其他文字
var copyFrom = destPath+'LXGWWenKai-Regular.ttf'
@0x401
0x401 / code.gs
Last active June 11, 2019 03:28
Google Sheet Script
function onOpen() {
var ui = SpreadsheetApp.getUi();
ui.createMenu('Soar')
.addItem('合并段落', 'mergeParagraphs')
.addItem('单词数(英语等)', 'getWordCount')
.addItem('单词数(日语等)', 'getLetterCount')
.addItem('移除空行','removeBlankRow')
.addSeparator()
.addItem('关于', 'showAbout')
.addToUi();
{config_load file="test.conf" section="setup"}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Check Update</title>
<link rel="stylesheet" href="css/theme.dropbox.css">
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.tablesorter.js"></script>
<link rel='stylesheet prefetch' href='css/bootstrap.min.css'>
{config_load file="test.conf" section="setup"}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Check Update</title>
<link rel="stylesheet" href="css/theme.dropbox.css">
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.tablesorter.js"></script>
<link rel='stylesheet prefetch' href='css/bootstrap.min.css'>
# coding=utf8
from bs4 import BeautifulSoup
from urllib.request import urlopen, Request
from urllib import error
from urllib.parse import urlparse, urljoin
import schedule
import datetime
import time
import MySQLdb
import gzip