Skip to content

Instantly share code, notes, and snippets.

@idelem
idelem / game.txt
Created March 14, 2023 04:26
flickgame
{"gameLink":"www.flickgame.org","canvasses":[[16000,"0"],[16000,"0"],[16000,"0"],[16000,"0"],[16000,"0"],[16000,"0"],[16000,"0"],[16000,"0"],[16000,"0"],[16000,"0"],[16000,"0"],[16000,"0"],[16000,"0"],[16000,"0"],[16000,"0"],[16000,"0"]],"hyperlinks":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]}
@idelem
idelem / game.txt
Created March 14, 2023 04:25
flickgame
{"gameLink":"www.flickgame.org","canvasses":[[16000,"0"],[16000,"0"],[16000,"0"],[16000,"0"],[16000,"0"],[16000,"0"],[16000,"0"],[16000,"0"],[16000,"0"],[16000,"0"],[16000,"0"],[16000,"0"],[16000,"0"],[16000,"0"],[16000,"0"],[16000,"0"]],"hyperlinks":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]}
@idelem
idelem / Export Nested JSON.lobster
Last active May 30, 2022 06:38
export nested json for treesheets
import std
let out = []
def add_text(s):
out.push("\"")
// \ and " need to be escaped in JSON:
out.push(escape_string(s, "\\\"", "\\", ""))
out.push("\"")
@idelem
idelem / game.txt
Created March 24, 2022 02:08
flickgame
{"canvasIndex":1,"gameLink":"www.flickgame.org","canvasses":[[97,"4",1,"5",102,"b",74,"4",2,"3",12,"4",1,"3",8,"4",1,"5",102,"b",73,"4",2,"3",1,"4",2,"3",4,"4",3,"3",2,"4",2,"3",2,"4",1,"3",5,"4",1,"5",102,"b",73,"4",1,"3",3,"4",1,"3",9,"4",1,"3",3,"4",1,"3",5,"4",1,"5",102,"b",77,"4",1,"3",3,"4",1,"3",2,"4",1,"3",2,"4",1,"3",3,"4",1,"3",5,"4",1,"5",102,"b",77,"4",1,"3",3,"4",1,"3",2,"4",1,"3",2,"4",1,"3",9,"4",1,"5",102,"b",72,"4",1,"3",8,"4",1,"3",2,"4",1,"3",2,"4",1,"3",9,"4",1,"5",102,"b",72,"4",1,"3",8,"4",1,"3",2,"4",1,"3",2,"4",1,"3",3,"4",1,"3",5,"4",1,"5",102,"b",73,"4",1,"3",4,"4",1,"3",2,"4",1,"3",2,"4",1,"3",2,"4",1,"3",3,"4",1,"3",5,"4",1,"5",91,"b",1,"3",10,"b",78,"4",1,"3",2,"4",1,"3",2,"4",1,"3",2,"4",1,"3",3,"4",1,"3",5,"4",1,"5",91,"b",1,"3",10,"b",81,"4",1,"3",2,"4",1,"3",6,"4",1,"3",5,"4",1,"5",21,"b",1,"3",80,"b",78,"4",1,"3",12,"4",1,"3",5,"4",1,"5",21,"b",1,"3",71,"b",1,"3",8,"b",74,"4",1,"3",3,"4",1,"3",18,"4",1,"5",91,"b",2,"3",9,"b",74,"4",1,"3",3,"4",1,"3",2,"4",1,"3",6,"4",1,"3",8,
@idelem
idelem / game.txt
Created March 24, 2022 02:06
flickgame
{"canvasIndex":0,"gameLink":"www.flickgame.org","canvasses":[[97,"4",1,"5",102,"b",74,"4",2,"3",12,"4",1,"3",8,"4",1,"5",102,"b",73,"4",2,"3",1,"4",2,"3",4,"4",3,"3",2,"4",2,"3",2,"4",1,"3",5,"4",1,"5",102,"b",73,"4",1,"3",3,"4",1,"3",9,"4",1,"3",3,"4",1,"3",5,"4",1,"5",102,"b",77,"4",1,"3",3,"4",1,"3",2,"4",1,"3",2,"4",1,"3",3,"4",1,"3",5,"4",1,"5",102,"b",77,"4",1,"3",3,"4",1,"3",2,"4",1,"3",2,"4",1,"3",9,"4",1,"5",102,"b",72,"4",1,"3",8,"4",1,"3",2,"4",1,"3",2,"4",1,"3",9,"4",1,"5",102,"b",72,"4",1,"3",8,"4",1,"3",2,"4",1,"3",2,"4",1,"3",3,"4",1,"3",5,"4",1,"5",102,"b",73,"4",1,"3",4,"4",1,"3",2,"4",1,"3",2,"4",1,"3",2,"4",1,"3",3,"4",1,"3",5,"4",1,"5",91,"b",1,"3",10,"b",78,"4",1,"3",2,"4",1,"3",2,"4",1,"3",2,"4",1,"3",3,"4",1,"3",5,"4",1,"5",91,"b",1,"3",10,"b",81,"4",1,"3",2,"4",1,"3",6,"4",1,"3",5,"4",1,"5",21,"b",1,"3",80,"b",78,"4",1,"3",12,"4",1,"3",5,"4",1,"5",21,"b",1,"3",71,"b",1,"3",8,"b",74,"4",1,"3",3,"4",1,"3",18,"4",1,"5",91,"b",2,"3",9,"b",74,"4",1,"3",3,"4",1,"3",2,"4",1,"3",6,"4",1,"3",8,
@idelem
idelem / game.txt
Created March 24, 2022 02:06
flickgame
{"canvasIndex":0,"gameLink":"www.flickgame.org","canvasses":[[97,"4",1,"5",102,"b",74,"4",2,"3",12,"4",1,"3",8,"4",1,"5",102,"b",73,"4",2,"3",1,"4",2,"3",4,"4",3,"3",2,"4",2,"3",2,"4",1,"3",5,"4",1,"5",102,"b",73,"4",1,"3",3,"4",1,"3",9,"4",1,"3",3,"4",1,"3",5,"4",1,"5",102,"b",77,"4",1,"3",3,"4",1,"3",2,"4",1,"3",2,"4",1,"3",3,"4",1,"3",5,"4",1,"5",102,"b",77,"4",1,"3",3,"4",1,"3",2,"4",1,"3",2,"4",1,"3",9,"4",1,"5",102,"b",72,"4",1,"3",8,"4",1,"3",2,"4",1,"3",2,"4",1,"3",9,"4",1,"5",102,"b",72,"4",1,"3",8,"4",1,"3",2,"4",1,"3",2,"4",1,"3",3,"4",1,"3",5,"4",1,"5",102,"b",73,"4",1,"3",4,"4",1,"3",2,"4",1,"3",2,"4",1,"3",2,"4",1,"3",3,"4",1,"3",5,"4",1,"5",91,"b",1,"3",10,"b",78,"4",1,"3",2,"4",1,"3",2,"4",1,"3",2,"4",1,"3",3,"4",1,"3",5,"4",1,"5",91,"b",1,"3",10,"b",81,"4",1,"3",2,"4",1,"3",6,"4",1,"3",5,"4",1,"5",21,"b",1,"3",80,"b",78,"4",1,"3",12,"4",1,"3",5,"4",1,"5",21,"b",1,"3",71,"b",1,"3",8,"b",74,"4",1,"3",3,"4",1,"3",18,"4",1,"5",91,"b",2,"3",9,"b",74,"4",1,"3",3,"4",1,"3",2,"4",1,"3",6,"4",1,"3",8,
@idelem
idelem / weasel.custom.yaml
Last active December 3, 2020 10:04
中州韵配置
patch:
"style/color_scheme": minimal
"style/horizontal": true
"style/font_point": 11
"style/layout/border_width": 0
"style/layout/margin_x": 8
"style/layout/margin_y": 8
"style/font_face": "Noto Sans CJK Medium"
preset_color_schemes:
@idelem
idelem / base.css
Created November 30, 2020 13:05
workflowy site generator
body {font-family:'Consolas', 'Menlo', 'Helvetica Neue', Arial, sans-serif; color:#333; font-size:13px; line-height:17px; max-width: 600px; margin: 2em auto 2em auto; }
@media screen and (max-width: 600px) {body {margin: 2em 1em;}}
body .name,body .note {white-space:pre-wrap;}
body ul {list-style:disc; margin:0; padding:0;}
body li {margin:4px 0 4px 20px; padding:0; list-style: none;}
body>.name {font-size:16px; line-height:21px;}
body>.note {font-size:13px; line-height:17px;}
body>ul {margin-top:15px;}body {font-family:'Consolas', 'Menlo', 'Helvetica Neue', Arial, sans-serif; color:#333; font-size:13px; line-height:17px; max-width: 100%; margin: 2em auto 2em auto; text-align:center;}
body .name,body .note {white-space:pre-wrap;}
body ul {list-style:disc; margin:0; padding:0;}
@idelem
idelem / workflowy-prune.py
Last active November 28, 2020 08:51
Generates static page from workflowy export files
# -*- coding: utf-8 -*-
import os, re
rootdir = '.'
def add_mobile_viewport_support(filepath):
metastr = ' <meta name="viewport" content="width=device-width, initial-scale=1">\n'
lines = []
with open(filepath, 'r', encoding='UTF-8') as f:
@idelem
idelem / titleUrlMarkdownClip.js
Last active November 4, 2024 22:22 — forked from bradleybossard/titleUrlMarkdownClip.js
Bookmarklet to copy current page title and url in Markdown format to clipboard, like [title](url) - Usual for posting links to resources in README.md files
javascript:(function() {
function copyToClipboard(text) {
if (window.clipboardData && window.clipboardData.setData) {
/*IE specific code path to prevent textarea being shown while dialog is visible.*/
return clipboardData.setData("Text", text);
} else if (document.queryCommandSupported && document.queryCommandSupported("copy")) {
var textarea = document.createElement("textarea");
textarea.textContent = text;