I hereby claim:
- I am dmyates on github.
- I am dyates (https://keybase.io/dyates) on keybase.
- I have a public key ASCvbnbKTOgPiB7lR4L_PkHDt6nNSB2G5LFITXgCCLYEdAo
To claim this, I am signing this object:
// Footnote previews for markdown by David Yates | |
// See an example here: | |
// https://davidyat.es/2020/12/31/footnote-previews/ | |
// | |
// License: MIT | |
// set previewSide to specify an additional class for footnote previews | |
refs = document.querySelectorAll("[id^=fnref]"); | |
activeBox = null; |
LUAOBJECT_GRAMMAR = %q{ | |
grammar LuaObject | |
rule luaobj | |
space value space { def to_ruby; value.to_ruby; end } | |
end | |
rule value | |
nil / float / number / string / table / boolean | |
end |
{{ .Get 0 | replaceRE "<ul>" "<dl>" .Inner | replaceRE "</ul>" "</dl>" | replaceRE "<li>" "<dt>" | replaceRE "(<dt>.*?): " "$1</dt><dd>" | replaceRE "</li>" "</dd>" | markdownify }} |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python | |
"""Simple HTTP Server With Upload. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
""" |
# Convert all files in dir from Ghost-compatible markdown to Hugo-compatible markdown | |
# (changes footnotes and headings) | |
# | |
# Usage: ruby md2md.rb /path/to/posts | |
# #Heading --> # Heading | |
def headings(str) | |
str.gsub(/(#+)(?=[^ #])/i,'\1 ') | |
end |
#!/usr/bin/python | |
# | |
# Count and compare the syllables for each set of two lines in the provided file. Bombs out with numbers and mispelt words. | |
# Uses Python 2.7 and nltk (pip install nltk) | |
import sys | |
from nltk.corpus import cmudict | |
d = cmudict.dict() | |
def syllable_count(word): |
# Simple directory-aware webshell hack | |
# Todo: get open-uri to co-operate with shell args for URLs | |
# For now, put the whole command-injection-vulnerable URL in the place indicated | |
# pls don't use for evil | |
require 'open-uri' | |
prefix = "" | |
command = "whoami" | |
while true |
# Hiding Messages in Images | |
# | |
# | |
# Just do this to encode messages: | |
# | |
# python hidemessage.py -e <filewithmessage> <imagetohidein> | |
# | |
# | |
# ...and do this to decode messages: | |
# |