Skip to content

Instantly share code, notes, and snippets.

View sonnguyen9800's full-sized avatar
💥
Doing Projects

Son Nguyen Hoang sonnguyen9800

💥
Doing Projects
View GitHub Profile
@sonnguyen9800
sonnguyen9800 / RemoveCalibreBookDuplicates
Created May 10, 2023 18:00
Remove duplicate books (book folder) in a book directory. Require you to use "Find Duplicate" plugin first.
import os
import shutil
# Script to remove duplicate books in Calibre
# 1. Use Calibre's "Find Duplicate" plugin & run check (binary check) to remove all binary files that are duplicated
# 2. Run this script, point to the book directory.
# How it works?
# - Duplicated folders have no ebook format. They only has 2 files: image (book cover) & metadata files.
# - This script purge all folders that has less than or equal to 2 files.
#
@sonnguyen9800
sonnguyen9800 / UIFadeinTmpro.cs
Created June 7, 2022 03:07
Unity: Make text (TMPro) fade-in letter by letter
/*
* Source: https://forum.unity.com/threads/have-words-fade-in-one-by-one.525175/
*/
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
public class FadeinTxtSon : MonoBehaviour
@sonnguyen9800
sonnguyen9800 / CustomTreeTraversal
Last active May 10, 2023 18:01
Custom Tree Traversal, C#
using System;
using System.Collections.Generic;
using System.Linq;
namespace ConsoleApp1
{
public class FrameContainer
{
public Frame FirstFrame;
@sonnguyen9800
sonnguyen9800 / UnstringlifyJsonFile.py
Last active May 10, 2023 18:02
Unstringlify Json file (Python)
import json
file_path = "file_path.txt"
file_path_output = "file_path_output.json"
f = open(file_path, "r", encoding='utf-16')
data_raw = f.read()
data_raw = data_raw.replace('\\', '')
data_raw = data_raw.replace('"{', '{')
data_raw = data_raw.replace('}"', '}')