Skip to content

Instantly share code, notes, and snippets.

View anezih's full-sized avatar

Nezih Aşula anezih

View GitHub Profile
@terrancesnyder
terrancesnyder / regex-japanese.txt
Created November 7, 2011 14:05
Regex for Japanese
Regex for matching ALL Japanese common & uncommon Kanji (4e00 – 9fcf) ~ The Big Kahuna!
([一-龯])
Regex for matching Hirgana or Katakana
([ぁ-んァ-ン])
Regex for matching Non-Hirgana or Non-Katakana
([^ぁ-んァ-ン])
Regex for matching Hirgana or Katakana or basic punctuation (、。’)
@aarondandy
aarondandy / words.cs
Created March 6, 2017 06:06
Make words
using System.Collections.Generic;
using System.Linq;
using Hunspell;
namespace ConsoleApplication5
{
class Program
{
static void Main(string[] args)
{
/*
* Use MuPDF's JavaScript API to copy the "table of contents" / document outline from one pdf file to another
* The script also copies styling information (italics / bold / color), by accessing this information via
* mupdf's PDFObject-API. It is mainly intended as a proof of concept for this type of operation.
* This is useful if you have to versions of the same pdf and want to copy the outline from one version to another
* Warning: the script performs no checks whether the outlined targets exist or make sense in the new document.
* Warning: this script removes existing outlines from the target document and overwrites it in place.
* Always keep a copy of the target document in case something goes horribly wrong.
* v.1 - 13.03.2025
* run as follows: node copytoc.mjs source.pdf target.pdf