This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I wrote this for work today after being unable to find a sortable list API for react to my liking | |
// Beware: It's only been tested for my use case | |
// Based largely off of https://github.com/danielstocks/react-sortable/blob/master/src/SortableComposition.js | |
export default class Sortable extends React.Component { | |
static get propTypes() { | |
return React.PropTypes.shape({ | |
items: React.PropTypes.array.isRequired, | |
updateState: React.PropTypes.func.isRequired, | |
// template should respect *inherits* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Stubs for pyrsistent (Python 3.6) | |
# | |
from typing import Dict, TypeVar, Generic, Iterable, Optional, Any, Union, Sequence | |
# PMap | |
K = TypeVar('K') | |
V = TypeVar('V') | |
class PMap(Generic[K, V], object): | |
def set(self, key: K, val: V) -> PMap[K, V]: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local villa = { o = "stone", t = "stonetop", ["8"] = "stucco", | |
["7"] = "arch_l", ["9"] = "arch_r", ["1"] = "stonebottom_l", ["3"] = "stonebottom_r", | |
["|"] = "pillar", ["T"] = "pillartop", ["/"] = "grasspillar", | |
[">"] = "shadowtop_l", ["}"] = "shadow_l", ["<"] = "shadowtop_r", ["{"] = "shadow_r", | |
["x"] = "ivy_a", ["X"] = "ivy_b", ["+"] = "ivy_c", | |
["$"] = "hang_a", ["%"] = "hang_b", ["&"] = "hang_c", | |
["#"] = "bush_a", ["@"] = "bush_a", | |
[","] = "grass_a", [":"] = "grass_b", [";"] = "grass_c", | |
["-"] = "ledge" } |