Skip to content

Instantly share code, notes, and snippets.

def convert_to_sentence_spacing(content)
content.gsub(/([.?!][)"]?) /, '\1 ')
end
Jekyll::Hooks.register :posts, :pre_render do | post |
if post["sentence_spacing"] then
post.content = convert_to_sentence_spacing(post.content)
end
end
@Kronopath
Kronopath / elianscriptify.py
Created November 2, 2017 07:20
Elian script unicode conversion
#!/usr/bin/env python3
import sys
def elianchar(char):
chars = {
"a": "𠃍",
"b": "コ",
"c": "┘",
"d": "冂",
@Kronopath
Kronopath / converter.py
Last active March 5, 2024 06:19
WeChat audio converter script. See http://kronopath.net/blog/extracting-audio-messages-from-wechat/ for more details.
# WeChat aud file converter to wav files
# Dependencies:
# SILK audio codec decoder (available at https://github.com/gaozehua/SILKCodec)
# ffmpeg
#
# By Gabriel B. Nunes (gabriel@kronopath.net)
# Adapted from another script by Nicodemo Gawronski (nico@deftlinux.net)
#
import os, argparse, subprocess