Skip to content

Instantly share code, notes, and snippets.

View pyrocat101's full-sized avatar

Linjie Ding pyrocat101

View GitHub Profile
/**
* Grid
*/
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/**
* Grid
*/
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
@pyrocat101
pyrocat101 / dabblet.css
Last active September 7, 2021 23:58
Grid
/**
* Grid
*/
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
diff --git a/packages/babel-plugin-react-intl/CHANGELOG.md b/packages/babel-plugin-react-intl/CHANGELOG.md
index 101e459d..c155a554 100644
--- a/packages/babel-plugin-react-intl/CHANGELOG.md
+++ b/packages/babel-plugin-react-intl/CHANGELOG.md
@@ -3,6 +3,84 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# 6.0.0 (2020-01-26)
+
@pyrocat101
pyrocat101 / record.py
Created June 3, 2015 00:22
Record as data container, optimized for access by name.
class Record(type):
"""
Metaclass for a class with named fields.
>>> class Point(object):
... __metaclass__ = Record
... __fields__ = ('x', 'y')
...
>>> p = Point(11, y=22) # instantiate with positional args or keywords
>>> p.x + p.y # access fields by name
(function(root) {
"use strict";
var RED = 0, BLACK = 1;
function Tree(color, left, key, value, right) {
this.color = color;
this.left = left;
this.right = right;
this.key = key;
this.value = value;
}
const vmt_B
:B.get_false
:B.get_true
:B.another_B_init
const vmt_C
:C.get_false
:B.get_true
:B.another_B_init
:C.c_init
const vmt_A
:A.init
:A.test_while
:A.get_if_self
:A.test_if_main
:A.test_if_0
:A.test_if1
:A.test_if2
:A.get_int
:A.set_e
@pyrocat101
pyrocat101 / evaluator.py
Created November 7, 2014 09:25
Expression evaluator
class Lexer(object):
def __init__(self, s):
self.s = s
self.idx = 0
self.token = None
def peek(self):
if self.idx >= len(self.s):
return None
else:
@pyrocat101
pyrocat101 / hashtbl.py
Created October 8, 2014 00:37
Naïve implementation of chained hash table, just for proof of concept.
class Bucket(object):
def __init__(self):
self.next = None
class Entry(object):
def __init__(self, key, val):
self.key = key
self.val = val
self.next = None