Skip to content

Instantly share code, notes, and snippets.

View akfish's full-sized avatar
🎯
刻舟求剑

大芡猫 akfish

🎯
刻舟求剑
View GitHub Profile
@akfish
akfish / converted.txt
Created February 5, 2014 16:24
CoffeeScript Grammar
/* converted on Thu Feb 6, 2014, 00:09 (UTC+08) by jison-to-w3c v0.33.722 which is Copyright (c) 2011-2013 by Gunther Rademacher <grd@gmx.net> */
Root ::= Body?
Body ::= Line ( TERMINATOR Line | TERMINATOR )*
Line ::= Expression
| Statement
Statement
::= Return
| Comment
| STATEMENT
@akfish
akfish / Sarcasm.md
Last active August 29, 2015 13:56
Make Better Irony with Sarcasm

Sarcasm Grammar Specification

Introduction

@akfish
akfish / full.md
Last active August 29, 2015 13:56
Emit C# Proxy Class at Runtime with ILGenerator

Emit C# Proxy Class at Runtime with ILGenerator

Problem Description

In C#, we often run into objects or services that provide dynmaic method invocation by a single method like:

public abstract class ProxyBase
{
  protected abstract object Invoke(object someMethodRelatedInfo, object[] arguments);
@akfish
akfish / concept.md
Last active August 29, 2015 13:57
Sarcasm AST Mapping Syntax

Sarcasm AST Mapping Syntax

Goal

  • Specify and generate AST node class
  • Map and automatically intialize AST node's fields

The Syntax

For NonTerminal

@akfish
akfish / content.md
Created March 7, 2014 22:26
The Making of Sarcasm (3) - Irony Grammar Class Generation

The Making of Sarcasm (3) - Irony Grammar Class Generation

Overview

An Irony grammar class is a C# class derived from Irony.Parsing.Grammar that defines the grammar for a language. The overall structure can be easily done by templating so it is not worth not worth discussing. We will concentrate on the actual work that is performed in its constructor:

  1. Decalare and initialize variables for terminals
  2. Decalare and initialize variables for non-terminals
  3. Defines rules
@akfish
akfish / concept.md
Created April 16, 2014 22:27
hexo-series concept

Hexo-Series Plugin Concept

Usage

See another document.

Source Storage

In source folder:

@akfish
akfish / tips.md
Created April 30, 2014 02:40
Coffee Meets Backbone

Override Constructor

class GlContainer extends Backbone.View
  constructor: (@selector) ->
    super arguments

Use =&gt;

@akfish
akfish / README.md
Last active August 29, 2015 14:00
BSC 5th Edition

Bright Star Catalogue, 5th Revised Ed. (Hoffleit+, 1991. Annotated by AKFish, 2014)

The Bright Star Catalogue, 5th Revised Ed. (Preliminary Version)

Hoffleit D., Warren Jr W.H.

<Astronomical Data Center, NSSDC/ADC (1991)>

=1964BS....C......0H

@akfish
akfish / concept.md
Created May 13, 2014 08:58
Shader.Js Concept

Shader.Js

Goal

  • Write WebGL shaders in JavaScript (shader classes)
  • Compile shader classes to GLSL at runtime or compile time
  • Assemble and run glProgram (material) seamlessly in JavaScript syntax

Review of Native WebGL Shading Workflow

@akfish
akfish / comment-count.ejs
Last active August 29, 2015 14:01
Hexo多说
<a href="<%= post.path %>#comments"><span class="ds-thread-count" data-thread-key="<%= post.path %>" data-count-type="comments">没有评论</span></a>