Skip to content

Instantly share code, notes, and snippets.

View quartzmo's full-sized avatar

Chris Smith quartzmo

  • Google
  • Salt Lake City, Utah, USA
  • 15:35 (UTC -07:00)
View GitHub Profile
@quartzmo
quartzmo / app.go
Last active August 4, 2023 21:43
OpenTelemetry Cloud Trace Fibonacci
package main
import (
"context"
"fmt"
"io"
"log"
"strconv"
octrace "go.opencensus.io/trace"
@quartzmo
quartzmo / haml2erb.rb
Created January 29, 2014 00:01
haml2erb.herokuapp.com client
require "net/http"
require "uri"
uri = URI.parse("http://haml2erb.herokuapp.com/api.json")
files = Dir.glob("app/views/**/*.html.haml")
files.each do |file|
haml = File.read(file)
response = Net::HTTP.post_form(uri, {"haml" => haml})
@quartzmo
quartzmo / hacked_workspace.rb
Created May 25, 2011 03:30
Hacking IRB WorkSpace
require 'irb/workspace'
module IRB
class WorkSpace
alias evaluate__orig evaluate
def evaluate(ctx, stmts, file=__FILE__, line=__LINE__)
result = evaluate__orig(ctx,stmts,file,line)