Skip to content

Instantly share code, notes, and snippets.

@brecert
brecert / logger.coffee
Created April 25, 2018 06:43
Small CoffeeScript Logger meant for future use.
class Logger
constructor: (@io = console.log) ->
@severityLevels = Object.freeze({
"DEBUG" : 1
"INFO" : 2
"WARN" : 3
"ERROR" : 4
"FATAL" : 5
"UNKNOWN" : 6
})
<%= START -%>
<% filtered_chat = "&filtered_chat" %>
&filtered_chat = %CHAT%
<%
mappings = {
# Custom
"snowflake" => "❄",
"shrug" => "¯\\_(ツ)_/¯",
"code" => "%@#code%",
import 'dart:html';
import 'dart:math';
// Element horseElement;
var horse = r"""
,
_,,)\.~,,._
(()` ``)\))),,_
| \ ''((\)))),,_ ____
{
"type": "root",
"children": {
"advancement": {
"type": "literal",
"children": {
"grant": {
"type": "literal",
"children": {
"targets": {
import os
import shutil
import tempfile
import sys
import distutils
from distutils import dir_util
import mmap
from bs4 import BeautifulSoup
# Logic
~ Logic
| desc : generic logic class
| inputs : 0
| outputs : 1
~ Battery < CoreLogic
| desc : a percentage type
| inputs : 0
| outputs : 1
parent_node : a node with no input
child_node : a node decending from another node
final_node : a node with no output
AST::GLOBALS =
MAX = 100
NON = 0
MIn = -100
battery < node
draw
chip
fill
border
icon
image?
inputs
input
outputs
output
# Input(uuid) is connecting to Output(uuid)
# input: output
uuid: uuid
abstract class LeafObject
def update(event); end
end
class Vec2D
property x : Float | Int | Double
property y : Float | Int | Double
def self(x, y)
self.new(x, y)