Skip to content

Instantly share code, notes, and snippets.

View crguezl's full-sized avatar
🌋

Casiano Rodriguez-Leon crguezl

🌋
View GitHub Profile
@crguezl
crguezl / .gitignore
Created March 20, 2018 08:59 — forked from DTrejo/.gitignore
How to Readline - an example and the beginnings of the docs
node_modules/
@crguezl
crguezl / javascript_ANSI_escape_codes.md
Created February 27, 2018 12:32 — forked from leommoore/javascript_ANSI_escape_codes.md
JavaScript - ANSI Escape Codes

#JavaScript - ANSI Escape Codes

ANSI Escape Codes are special characters which can be used to control formatting, colors or other output preferences in a text terminal. Escape Codes are non-printing code and will not appear in the output directly.

  • \033 begins the escape sequence
  • [ indicates the color
  • 33 is the foreground color for yellow
  • m indicates the end of the setting

Note: \033[39m is used set the color back to the terminal defult

@crguezl
crguezl / arithmetic.pegjs
Created April 19, 2016 14:22 — forked from anujku/arithmetic.pegjs
Simple Arithmetics Grammar
/*
* Simple Arithmetics Grammar
* ==========================
*
* Accepts expressions like "2 * (3 + 4)" and computes their value.
*/
{
function combine(first, rest, combiners) {
var result = first, i;
require 'sinatra'
require 'sinatra/contrib'
require 'sinatra/reloader' if development?
get '/' do
<<-"EOS"
cookies: #{cookies}<br/>
<a href="/set">Set the cookie 'something' to 'foobar'</a><br/>
<a href="/merge">cookies.merge! 'foo' => 'bar', 'bar' => 'baz'</a>
EOS
@crguezl
crguezl / Gemfile
Created March 29, 2014 16:43 — forked from fairchild/Gemfile
source :rubygems
gem 'sinatra'
gem 'json'
gem 'omniauth'
gem 'omniauth-oauth2'
gem 'omniauth-github'
# gem 'omniauth-att', :path => File.expand_path("./../../omniauth-att", __FILE__)
gem 'thin'