Skip to content

Instantly share code, notes, and snippets.

View nathanlesage's full-sized avatar
🔥
いこう!

Hendrik Erz nathanlesage

🔥
いこう!
View GitHub Profile
@nathanlesage
nathanlesage / index.htm
Created December 2, 2023 17:27
Wordle clone
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Zettle</title>
<style>
body {
background-color: rgb(69, 69, 95);
color: white;
@nathanlesage
nathanlesage / index.htm
Last active October 24, 2022 09:15
ContentEditable Demo (CodeMirror 6)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ContentEditable Demo</title>
<script src="index.js"></script>
</head>
<body>
@nathanlesage
nathanlesage / export_comments.lua
Created June 11, 2022 13:43
A Pandoc filter for exporting HTML comments
-- Default: Don't export comments
local comments = nil
function Meta (meta)
-- If there is a "comments" field in the YAML frontmatter, extract this
if meta.comments then
comments = pandoc.utils.stringify(meta.comments)
end
return meta
end
@nathanlesage
nathanlesage / sotu.csv
Created June 4, 2022 12:35
State of the Union (SOTU) Corpus
We can't make this file beautiful and searchable because it's too large.
@nathanlesage
nathanlesage / tts.sh
Created January 17, 2022 22:23
A small utility function to quickly convert a text file into a spoken track
# TTS COMMAND
#
# This command is a handy utility that allows you to quickly convert
# a text file into a speech recording.
#
# NOTE: This will only work on macOS, since it relies on the `say`
# command which utilizes Apple's speech synthesis system.
#
# REQUIRED: ffmpeg. You can easily install this using `brew install ffmpeg`
#
@nathanlesage
nathanlesage / index.md
Last active May 16, 2019 15:49
ScanTailor Compiler Run macOS 10.14.4 Mojave

Setting up the current ScanTailor on macOS (tested on Mojave 10.14.4)

Reference: https://forum.diybookscanner.org/viewtopic.php?t=3407#p20608

  1. Download the experimental branch from here: https://github.com/Tulon/scantailor/tree/experimental (Or, possibly, in the future: Some other fork of ScanTailor)
  2. In the file scantailor-experimental/filters/page_split/OptionsWidget.cpp add after all the #include-statements the following line: #include <QButtonGroup>
  3. Via homebrew run: brew install cmake eigen qt5 jpeg libtiff boost
  4. CD into the scantailor-directory (root level)
  5. Run cmake . -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt/5.8.0_2 -- attention: Replace the Qt-version with the one that brew installed!
  6. if it was successful (read the last few lines of output), run: make
@nathanlesage
nathanlesage / github_download_counter.php
Last active November 17, 2023 14:09
This PHP file simply requires an online web server and some variables by you and it will show you the overall statistics of your repository.
<?php
/*
* GitHub Download Counter page
* Created by Hendrik Erz <hendrik@zettlr.com>
* Licensed via GNU GPL v3
*/
// CONFIG
$repo = 'Zettlr/Zettlr'; // The repository