Skip to content

Instantly share code, notes, and snippets.

View ziofat's full-sized avatar

ziofat ziofat

  • Tencent
  • Shenzhen, China
View GitHub Profile
@ziofat
ziofat / deskew.js
Created December 1, 2025 03:31
A script to deskew card photos
import * as cv from '@u4/opencv4nodejs';
import * as fs from 'fs';
import * as path from 'path';
import { execSync } from 'child_process';
// --- 配置 ---
const CARD_WIDTH = 1080; // 输出卡片的宽度(像素)
const CARD_HEIGHT = 1512; // 输出卡片的高度(像素),保持标准扑克牌比例 (63mm x 88mm)
function processImage(filePath, finalWebpPath, outputDir, debugDir, debugMode, quality) {
@ziofat
ziofat / setup-taiga-centos.sh
Last active March 10, 2024 02:08 — forked from sink66/setup-taiga-centos.sh
Taiga.io minimum install & run commands / CentOS7.2
#!/bin/bash
# How to use
# 1. Replace the "YOURIP" to yourIP
# 2. Run at the root -> source setup-taiga-centos.sh
yum install -y gcc autoconf flex bison libjpeg-turbo-devel
yum install -y freetype-devel zlib-devel zeromq-devel gdbm-devel ncurses-devel
yum install -y automake libtool libffi-devel curl git tmux
yum install -y libxml2-devel libxslt-devel
<!--
Created by Kuitos on 2015/03/06 10:15 AM.
Modified by Ziofat on 10/07/2015.
Email: kuitos.lau@gmail.com
author: EdwardCTaylor
author: Kuitos
author: Ziofat
Licence: MIT
-->
<!DOCTYPE html>