Skip to content

Instantly share code, notes, and snippets.

View lynn's full-sized avatar
🐞

Lynn lynn

🐞
View GitHub Profile
@lynn
lynn / tio-syntax-highlighting.user.js
Created October 22, 2018 13:06
TamperMonkey syntax highlighting userscript for https://tio.run/
// ==UserScript==
// @name TIO Syntax Highlighting
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Syntax highlighting for https://tio.run/
// @author Lynn
// @match https://tio.run/
// @require https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.40.2/codemirror.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.40.2/mode/haskell/haskell.min.js
# To use this, you need Python 3.5+ and pip.
#
# 1. Make a new Discord app with a bot. https://discordapp.com/developers/applications/
#
# 2. Set environment variable SIMPLEWORDS_TOKEN on your computer to the bot's Token.
# Unix/Mac: export SIMPLEWORDS_TOKEN=MzABCDefghIJKLmnopQRSTuv.EnZ3kg.b5bdD74CKCr3du679hkemGJ7R7N
# PowerShell: $env:SIMPLEWORDS_TOKEN='MzABCDefghIJKLmnopQRSTuv.EnZ3kg.b5bdD74CKCr3du679hkemGJ7R7N'
#
# 3. Invite the bot to your server: https://stackoverflow.com/a/37743722/257418
#
@lynn
lynn / kardytrixe.md
Last active May 6, 2021 13:10
la kardytrixe

This is a document explaining some intermediate-level Lojban to people who finished reading la karda. I'll try to explain the topics you really need to understand to bridge the gap between la karda and everyday conversations or prose!

More on tanru

You know about tanru: they are "compounds" of selbri formed simply by juxtaposing them. Let me jog your memory with some examples:

  • .i vi lenku tcima = It's cold-kind-of-weather here.
  • .i mi snuti darxi lo pendo ku = I accident-kind-of-hit my friend.
  • .i lo cukta pixra ku melbi = The book-kind-of-picture is pretty.
  • .i lo blanu karce ku spofu = The blue-kind-of-car is broken down.
<!doctype html>
<!-- This is just a very slightly modified tracking.js demo: https://trackingjs.com/examples/face_camera.html -->
<html>
<head>
<meta charset="utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/tracking.js/1.1.3/tracking-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tracking.js/1.1.3/data/face-min.js"></script>
<style>
video, canvas {
margin-left: 100px;
@lynn
lynn / lo-nu-se-zdani.txt
Created June 9, 2018 19:15
"lo nu se zdani" in English
"AT HOME"
A short, [???] story.
A) My house is so sturdy! It's got no trouble keeping me safe from the snow.
B) Did you hear about the snowfall in the nearby city?
A) Oh yeah, I heard, yikes. This blizzard is really too strong.
A) But, I tell you, it's no match for my lovely house! Not to mention it's got a fireplace, and there's tea... Ah, please, B, come inside!
B) Wow, sounds like it'll blow my socks off -- I'll gladly come in.
@lynn
lynn / corpus.txt
Last active May 9, 2018 17:11
Jelly corpus
2Ḷṗ4ḣ11Y
⁴r26BḊ€Y
2Bṗ4ṫ6Y
,Z;.ị$⁺€ḟ€"⁾-|Fḟ”+
ẆḊÐfZ€µ⁺€ẎÇÐḟL
9Bṁ×ḶṚÆ¡‘Œ?
ÆFḅÆdÆẸ
⁹ḶH+^ḶBḊ€Y
2*Ḷ^H$
“ḃ»ḟ
@lynn
lynn / cakla.rb
Created April 15, 2018 12:20
Cute little IRC bot
require 'socket'
server, port, name, channels = ARGV
bot = Hash.new { |hash, key| -> _ { 'Unknown command: ' + key } }
bot['sum'] = -> args { args.map(&:to_i).reduce(0, :+) }
bot['dice'] = -> args { args.map{|n| rand(n.to_i) + 1}.join(' ') }
bot['emoji'] = -> args { (1..5).map{rand(300) + 0x1f300}.pack('U*') }
TCPSocket.open(server, port) do |irc|
@lynn
lynn / smbpatch.py
Created March 9, 2018 17:18
Patching new music into Super Mario Bros.
########################################
# Utility functions
########################################
def cpu_to_rom(addr: int) -> int:
return addr - 0x8000 + 0x10
def rom_to_cpu(addr: int) -> int:
return addr + 0x8000 - 0x10
@lynn
lynn / ger2.tex
Last active February 28, 2018 11:59
Groepen & Ringen huistaak 2
\documentclass[12pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage[dutch]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{enumerate,microtype,parskip,mathpazo}
@lynn
lynn / gamegenie.py
Created February 22, 2018 20:26
Describe Game Genie codes
#!/usr/bin/env python3
import sys
def describe(code):
"""
Return a written description of what a Game Genie code does.
Args:
code (str): A 6- or 8-letter Game Genie code like 'SXIOPO' or 'PEVXIYGA'.