Skip to content

Instantly share code, notes, and snippets.

View duangsuse's full-sized avatar
👨‍💻
Leaning at school

duangsuse duangsuse

👨‍💻
Leaning at school
View GitHub Profile
@duangsuse
duangsuse / GeekApkSpec.tex
Last active August 11, 2018 16:45
GeekApk basic design document 📑🚀
% GeekApk basic design document
% License: CC-BY
% Author: duangsuse
% Toolchain: XeLaTeX
\documentclass[a4paper, 11pt]{article}
% XeTex is utf8 based
%\usepackage[utf8]{inputenc}
@duangsuse
duangsuse / GeekApkSpecShort.log
Last active August 12, 2018 08:12
GeekApk spec (short version)
This is XeTeX, Version 3.14159265-2.6-0.99998 (TeX Live 2017) (preloaded format=xelatex 2018.8.11) 12 AUG 2018 09:09
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**GeekApkSpecShort.tex
(./GeekApkSpecShort.tex
LaTeX2e <2017-04-15>
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
@duangsuse
duangsuse / gitapk.md
Last active August 12, 2018 13:36
Gekyll - GitApk 的静态网站生成程序

Gekyll - GitApk 的静态网站生成程序

Gekyll 的命名来源于 Jekyll,一个使用 Ruby 编写的静态博客网站生成器

Jekyll:将纯文本转换为静态博客网站

Gekyll 则是一个 Crystal 程序,类似于 Jekyll,它生成静态网站,不过,它为 GitApk - 基于 Gitea 等服务的 GeekApk 网站生成静态页面

Gekyll:将 Markdown、纯文本和 YAML 元数据 渲染为静态 GeekApk 网站

@duangsuse
duangsuse / rebase-api.md
Last active August 12, 2018 21:03
Rebase - originally authored by @drakeet modified by duangsuse, compatible with Rebase API 0.7.x

Specifications v0.7.2 | Rebase API 接口约定

This describes the resources that make up the official Rebase API by drakeet.

If you have any problems or requests please contact drakeet or create an issue.

Schema | 模式

All API access is over HTTPS, and accessed from the https://server/rebase. All data is sent and received as JSON.

@duangsuse
duangsuse / BubbleSorter.html
Created August 13, 2018 06:32
也不算是「quick」version,因为 wiki 上的那个版本也很快,对比一些国内的博客是少比较了n 次,但是,常量是不进大 O 表示法的
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<meta charset="utf8">
<!-- Generated by javadoc (1.8.0_181) on Mon Aug 13 14:19:50 CST 2018 -->
<title>BubbleSorter</title>
<meta name="date" content="2018-08-13">
<style>
/* Javadoc style sheet */
@duangsuse
duangsuse / rebase-openapi3.yml
Created August 14, 2018 12:18
Rebase API OpenAPI Spec
# Copyright(C) 2018 duangsuse
# A RESTful API for everyone. Open Source.
# Licensed under CC-BY
# Fit OpenAPI 3.0.0 standards
openapi: 3.0.0
# Added by API Auto Mocking Plugin
# Testing servcices
servers:
@duangsuse
duangsuse / home-watermarks.svg
Last active August 19, 2018 13:09
Gekyll 複製版本 RIME.im 背景圖
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import java.awt.Color
import java.awt.image.BufferedImage
import java.net.URL
import javax.imageio.ImageIO
object Image2Ascii {
private fun colorAverage(image: BufferedImage, x: Int, y: Int): Color {
val sampleDiff = step - 1
val lt = Color(image.getRGB(x, y + sampleDiff))
@duangsuse
duangsuse / SchemeIL.md
Last active October 3, 2018 14:40
🖥 Intermediate Language and VM for Scheme Implementations

Intermediate Language for Scheme

为 Scheme 实现准备的 IL(中间语言) 和执行模式 原文档

BiwaScheme 是一个基于虚拟机的字节码解释型语言,Scheme 代码通过 BiwaScheme.Compiler 翻译为中间语言,并随后在 BiwaScheme.Interpreter 中解释执行

实现的大部分字节码设计基于 R. Kent Dybvig 1987 年发布的论文 《三种 Scheme 实现模型》

显然地,这里描述的 不是 BiwaScheme VM,但与之类似

@duangsuse
duangsuse / sexp.rb
Created October 4, 2018 03:52
Test lexer and parser
class Token
LPAREN = '('; RPAREN = ')'; EOS = '\00'
NUM = '1'; STR = '"'; SYM = ':'; EXP = '_'
NUMSTR = "1234567890."
def initialize(type, text)
@type = type; @text = text
end