Skip to content

Instantly share code, notes, and snippets.

@jason-s
jason-s / README.md
Created Jun 29, 2022
MathJax in SVG
View README.md

SVG_MathJax

This replaces MathJax inline markup in an <svg> element with SVG-rendered MathJax.

Usage is easy:

<html>
    <head>
 
View quepland-bonuses.txt
Food side-effects
Jerky Bonus Cul Arts Hunting
-----
Rabbit +5 Knifesmanship 1 1
Deer +5 Archery 5 5 (18 Buck)
Bear +5 Hammership 30 50
Moose +5 Swordsmanship 45 65
Boar +5 Mining 35 43
Pigeon +5 Axemanship 1 1
@jason-s
jason-s / README.md
Last active Apr 3, 2021
Wordpress ate my матрёшка hacker code
View README.md

I was looking for a motor website and noticed this suspicious looking JavaScript code:

https://web.archive.org/web/20200705182323/http://www.turnigy.com:80/about-us/

It is apparently a 3-level deep obfuscation of some website redirection that failed, because Wordpress faithfully encoded it rather than inserting directly.

  • hack1.js is the code that appears visually in the webpage.
  • hack2.js is the content of variable VWGMMLIBLQ that gets eval()d in hack1.js
  • hack3.js is the content of variable BPCDLVJEMJ that gets eval()d in hack2.js
  • hack4.js is the content of variable dec that gets executed via (new Function(dec))(); in hack3.js
View test1.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View katex2267-0.12.0.html
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.12.0/katex.min.css" />
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.12.0/katex.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.12.0/contrib/auto-render.min.js"></script>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function(event) {
@jason-s
jason-s / scavhunt-20200613.md
Last active Jun 13, 2020
2020 Jun 13 Scavenger Hunt Rules
View scavhunt-20200613.md

Country of Origin

At-home Scavenger Hunt, June 13, 2020

J. Sachs

Version 1.01

@jason-s
jason-s / scavhunt1.md
Last active Jun 13, 2020
Scavenger Hunt Part 1 Rules
View scavhunt1.md

At-Home Scavenger Hunt Rules: Part 1 (General)

J. Sachs, 13 Jun 2020

Version 1.01

Overview

Goal: to submit an entry which scores the most points based on a predetermined scoring procedure as outlined in Part 1 and Part 2.

View polymorph3.py
import jsonschema
import yaml
schema1 = yaml.safe_load("""
title: SCHEMA 1 (foo_node or bar_node)
$ref: '#/definitions/root_node'
$schema: http://json-schema.org/draft-07/schema#
definitions:
bar_node:
additionalProperties: false
@jason-s
jason-s / person_view.enaml
Created Apr 9, 2020
Observing return events in Field objects in enaml
View person_view.enaml
#------------------------------------------------------------------------------
# Copyright (c) 2013, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#------------------------------------------------------------------------------
#
# mods by Jason Sachs
#