Skip to content

Instantly share code, notes, and snippets.

@HectorMalot
HectorMalot / index.html
Last active December 12, 2015 08:39
d3.js experiments
<!DOCTYPE html>
<html>
<head>
<title>Easy Barchart
</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?1.29.1"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?1.29.1"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.time.js?1.29.1"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.csv.js?1.29.1"></script>
<style type="text/css">
use a jQuery script as your password that autofills and submits the form for karma_fountain
@HectorMalot
HectorMalot / gist:2768248
Created May 22, 2012 10:41
Ruby Segfaults (1.9.3-p194)
[8] pry(main)> DentistMailer.new_duty_email(Duty.last, Dentist.last, "test").deliver
/Users/dennis/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/smtp.rb:583: [BUG] Segmentation fault
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.4.0]
-- Control frame information -----------------------------------------------
c:0045 p:---- s:0174 b:0174 l:000173 d:000173 CFUNC :connect
c:0044 p:0059 s:0171 b:0171 l:000170 d:000170 METHOD /Users/dennis/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/smtp.rb:583
c:0043 p:0255 s:0166 b:0165 l:000390 d:000390 METHOD /Users/dennis/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/smtp.rb:560
c:0042 p:0047 s:0157 b:0157 l:000156 d:000156 METHOD /Users/dennis/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/smtp.rb:519
c:0041 p:0668 s:0150 b:0150 l:000149 d:000149 METHOD /Users/dennis/.rvm/gems/ruby-1.9.3-p194@dpt/gems/mail-2.4.4/lib/mail/network/delivery_methods/smtp.rb:144
@HectorMalot
HectorMalot / Bash
Created April 7, 2012 16:43
Ruby Segfaults (1.9.3-p125)
run bundle install
/Users/dennis/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/net/http.rb:799: [BUG] Segmentation fault
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.3.0]
-- Control frame information -----------------------------------------------
c:0038 p:---- s:0217 b:0217 l:000216 d:000216 CFUNC :connect
c:0037 p:0011 s:0214 b:0214 l:001b70 d:000213 BLOCK /Users/dennis/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/net/http.rb:799
c:0036 p:0031 s:0212 b:0212 l:000211 d:000211 METHOD /Users/dennis/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/timeout.rb:54
c:0035 p:0026 s:0200 b:0200 l:000199 d:000199 METHOD /Users/dennis/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/timeout.rb:99
c:0034 p:0485 s:0194 b:0194 l:001b70 d:001b70 METHOD /Users/dennis/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/net/http.rb:799
before disabiling the GC during the request
Rendered posts/_post_header.html.haml (2.7ms)
Rendered posts/_post_header.html.haml (3.7ms)
Rendered posts/_post_header.html.haml (2.5ms)
Rendered posts/_post_header.html.haml (2.6ms)
Rendered posts/_post_header.html.haml (3.7ms)
Rendered posts/_post_header.html.haml (9.6ms)
Rendered posts/_post_header.html.haml (269.5ms)
Rendered posts/_post_header.html.haml (2.1ms)
- for post in @posts
.post
.row
= render :partial => 'post_header', :locals => {:post => post}
@HectorMalot
HectorMalot / gist:1988204
Created March 6, 2012 18:59
Disable GC during rails request
class ApplicationController < ActionController::Base
around_filter :disable_gc
private
def disable_gc
GC.disable
begin
yield
ensure
#
# bash completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
# *) local and remote branch names