Skip to content

Instantly share code, notes, and snippets.

View teliosdev's full-sized avatar
:shipit:

Jeremy Rodi teliosdev

:shipit:
View GitHub Profile
// AffectedArc07's T-comm script
underline = 0; // Prefab Variable
bold = 0; // Prefab Variable
cardcolor = "ffffff"; // Prefab Variable
color = "000000"; // Prefab Variable
def doAsdafagus(theText,from,to) // Defines the function
{
newText = replace(theText, " " + from + "ä", " " + to);
newText = replace(newText, "ä" + from + " ", to + " ");
newText = replace(newText, " " + from + " ", " " + to + " ");
@teliosdev
teliosdev / .rubocop.yml
Created March 6, 2017 07:26
My Rubocop File.
AllCops:
TargetRubyVersion: 2.3
Metrics/LineLength:
Enabled: false
Metrics/MethodLength:
Max: 15
Metrics/BlockLength:
Exclude:
- 'spec/*.rb'
{
"configuration": {
"require": [
{ "header": "stdlib.h" },
{ "header": "stdint.h" },
{ "header": "stdio.h" }
]
}
}
%grammar.type "ruby"
%require "~> 0.1"
%token IDENT
%token NUM
%token PLUS "+"
%token MINUS "-"
%token DIVIDE "/"
%token MULTIPLY "*"
%token EQUALS "="
@teliosdev
teliosdev / lexer.rb
Last active August 29, 2015 14:04
Antelope Lexer Example
require "strscan"
class Lexer
def initialize(input)
@input = input
@scanner = StringScanner.new(input)
@line = 1
end
def lex
module Liquidscript
class Parser
module PredictMatch
# Makes a prediction based on a set of actions. If the peek token
# doesn't have an action, it will try the special action `:_`, and
# then give up. If it finds a corresponding action either time, it
# will run the action.
#
# @param actions [Hash<Symbol => Symbol>]
module Liquidscript
module AST
class Node
class << self
# Define a child node for this node. It accepts a name.
#
# @param name [Symbol] the name of the child.
# @return [void]
post_comments = Hash.new
def find_comments_for(post_id)
post_commends.fetch(post_id) do
post_comments[post_id] = fetch_comments(post_id)
end
end
def fetch_comments(post_id)
# ...
require 'hashie'
puts "The hashie version is: #{Hashie::VERSION}"
class Test
include Streamable
def output(thing)
p thing
end
end
Test.new.stream ["hello"], :output