Skip to content

Instantly share code, notes, and snippets.

@YumiChen
YumiChen / install_tesseract_with_headers.md
Last active April 19, 2025 14:04
install_tesseract_with_headers

install_tesseract_with_headers.sh

#!/bin/bash

set -e

# Customize this
TAP_NAME="yourname/tesseract-dev"
TESS_VERSION="5.3.4"
TESS_URL="https://github.com/tesseract-ocr/tesseract/archive/refs/tags/${TESS_VERSION}.tar.gz"
[cssVariables]: async function ({ dictionary, options = {}, file }) {
const selector = Array.isArray(options.selector)
? options.selector
: options.selector
? [options.selector]
: [`:root`];
const { outputReferences, outputReferenceFallbacks, usesDtcg, formatting } = options;
const header = await fileHeader({
file,
formatting: getFormattingCloneWithoutPrefix(formatting),
[cssVariables]: async function ({ dictionary, options = {}, file }) {
const selector = Array.isArray(options.selector)
? options.selector
: options.selector
? [options.selector]
: [`:root`];
const { outputReferences, outputReferenceFallbacks, usesDtcg, formatting } = options;
const header = await fileHeader({
file,
formatting: getFormattingCloneWithoutPrefix(formatting),
// https://indesignsecrets.com/tackling-tables-through-scripting.php?fbclid=IwAR0ucccbZqLyoDtyIYj6Yh1EoA1LGwCTL6yFmb1bgwD4sdjvPh6GHj0pCpQ
app.doScript(checkUserSelection, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, "Process Table");
function checkWhichTable() {
// ensure the user made a selection
if (app.selection.length != 1)
return null;
var currentTable = app.selection[0];
if (currentTable.hasOwnProperty("baseline")) {
currentTable = app.selection[0].parent;
// http://jongware.mit.edu/idcs6js/pc_Row.html
app.doScript(mergeCells, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, "Process Table");
function mergeCells ()
{
var cells = app.selection[0].cells;
// merge the cells that are at the same row with others
for(var i = 1; i < cells.length; i++){
if(cells[i-1] instanceof Cell || cells[i] instanceof Cell){
@YumiChen
YumiChen / ajax.js
Created January 7, 2019 10:31
ajax function
export function ajax(type, url, data, contentType) {
// url = 'http://localhost:14085' + url;
return new Promise((resolve, reject) => {
const xhr = new XMLHttpRequest();
xhr.onreadystatechange = () => {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
const rtnData = JSON.parse(xhr.responseText),
rtnCode = rtnData.rtnCode;
if( rtnCode === rtnCodes.serverError ||
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Player : MonoBehaviour {
[SerializeField] float moveSpeed = 10f;
[SerializeField] float padding = 0;
[SerializeField] GameObject laserPrefab;
[SerializeField] float projectileSpeed = 10f;
@YumiChen
YumiChen / index.pug
Created August 16, 2018 03:05
VxoYYo
#app