Skip to content

Instantly share code, notes, and snippets.

View mer0mingian's full-sized avatar
🖖

Daniel Mingers mer0mingian

🖖
View GitHub Profile
@hanxiao
hanxiao / testRegex.js
Last active May 21, 2025 04:26
Regex for chunking by using all semantic cues
// Updated: Aug. 20, 2024
// Run: node testRegex.js whatever.txt
// Live demo: https://jina.ai/tokenizer
// LICENSE: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0)
// COPYRIGHT: Jina AI
const fs = require('fs');
const util = require('util');
// Define variables for magic numbers
const MAX_HEADING_LENGTH = 7;
@AdrianBenson
AdrianBenson / miniforge_windows_install.md
Last active November 4, 2024 19:40
Install miniforge/mambaforge on windows

Installing Miniforge3 on a GNS Windows machine

This guide will show you how to install and configure Miniforge on a GNS Windows PC. Before you jump into the install there are a few things you should understand

  • This a "user" install. No adminstator privileges are required. Miniforge will be installed under your user profile, so other users of a given PC wil not have access to your Miniforge installation.
  • You are responsible for maintaining all aspects of your Miniforge installation.
  • Miniforge is not available via Software Centre and is not officially supported by GNS IT. Nevertheless, IT know all about Miniforge and endorse your use of it.
  • If you have any problems you should first try asking for help from GNS Python Users on Microsoft Teams. IT Support may be able to help, but t
@jsoma
jsoma / README.md
Last active April 8, 2025 10:06
How to use pandoc and Markdown to build a simple reveal.js presentation (and a bit about how to customize it, too)

Requirements

First you need to install pandoc.

I used brew install pandoc to install via Homebrew since I'm on a mac.

Writing your presentation

Make a slides.md for your slides (or name it whatever you want!). I put images in an /images/ folder. You can see how links and images and all of that work from this sample:

@metacritical
metacritical / compress_pdf.sh
Created December 24, 2016 15:49
Compress/optimize PDF file
#! /bin/bash
# AUTHOR: (c) Ricardo Ferreira
# NAME: Compress PDF 1.4
# DESCRIPTION: A nice Nautilus script with a GUI to compress and optimize PDF files
# REQUIRES: ghostscript, poppler-utils, zenity
# LICENSE: GNU GPL v3 (http://www.gnu.org/licenses/gpl.html)
# WEBSITE: https://launchpad.net/compress-pdf
# Messages
@patik
patik / styles.css
Last active February 14, 2025 06:54 — forked from joshbode/numbered_headings.md
Numbered Headings in Markdown via CSS
body { counter-reset: h1counter h2counter h3counter h4counter h5counter h6counter; }
h1 { counter-reset: h2counter; }
h2 { counter-reset: h3counter; }
h3 { counter-reset: h4counter; }
h4 { counter-reset: h5counter; }
h5 { counter-reset: h6counter; }
h6 {}
h2:before {
@mengwong
mengwong / numberHeaders
Last active December 31, 2023 15:52
number headers in Google Docs
// PROBLEM: in Google Documents, sometimes you want numbered headings, but the UI makes you a new list each time.
// INSIGHT: it's possible, but you have to script it.
// SOLUTION: this script adds OL+LI to Hs, all using the same listID
// DOWNLOAD: get the latest version of this gist from https://gist.github.com/mengwong/f597d064366f555b5f4e
// INSTALL: Go to Tools / Editor. Paste this in. Hit save. You can run it by pressing the "play" button, or from the Add-Ons menu.
//
// USAGE:
// REQUIRED: Define all your headings as actual headings and not just big bold Normal. Come on, people, learn to use paragraph styles already.
// OPTIONAL: Manually make the first H1 in the document a numbered list. We'll use that as a reference heading for all the others.
// OPTIONAL: Manually set the list style to "Decimal Outline" (the style that has 1.1.2 type numbering) ... I like this best.