Skip to content

Instantly share code, notes, and snippets.

@inbeom
inbeom / gist:5148719
Created March 13, 2013 01:39
Sidekiq crash dump #1
2013-03-13T01:36:46Z 13337 TID-dkp34 MatchingResultGenerator JID-0bba4d6cde3990c2a338350b INFO: done: 5.801 sec
2013-03-13T01:36:46Z 13337 TID-i7140 MessagesPostProcessor JID-423c5e9a861679f14203a730 INFO: start
/var/rack/matchpoint/shared/bundle/ruby/1.9.1/gems/celluloid-0.12.3/lib/celluloid/thread_handle.rb:17: [BUG] Segmentation fault
ruby 1.9.3p362 (2012-12-25 revision 38607) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0006 p:0007 s:0015 b:0015 l:001608 d:000014 BLOCK /var/rack/matchpoint/shared/bundle/ruby/1.9.1/gems/celluloid-0.12.3/lib/celluloid/thread_handle.rb:17
c:0005 p:---- s:0013 b:0013 l:000012 d:000012 FINISH
c:0004 p:---- s:0011 b:0011 l:000010 d:000010 CFUNC :call
c:0003 p:0021 s:0008 b:0008 l:000ae8 d:000007 BLOCK /var/rack/matchpoint/shared/bundle/ruby/1.9.1/gems/celluloid-0.12.3/lib/celluloid/internal_pool.rb:48
@inbeom
inbeom / parse.rb
Created November 11, 2012 14:20
Parser for HTML files generated by Microsoft Excel
# encoding = utf-8
require 'nokogiri'
require 'iconv'
require 'table_parser'
module TableParser
class Table
def each
return unless block_given?
@inbeom
inbeom / gist:4050953
Created November 10, 2012 12:33
A weird mongoid relation
module Abnormal
module Models
class Issue
include Mongoid::Document
field :exception_class, type: String
field :message, type: String
field :uniqueness_hash, type: String
field :status, type: String, default: OPEN
field :_id, type: String, default: -> { "#{app_id}#{uniqueness_hash}" }
@inbeom
inbeom / resize_instance.sh
Created November 5, 2012 12:14 — forked from thefron/resize_instance.sh
EC2 instance resizing script
#!/bin/bash
# resize_instance.sh
# Resize specified instance with given size
# resize_instance.sh [instance_id] [size]
# This script is based on http://alestic.com/2010/02/ec2-resize-running-ebs-root
E_BADARGS=65
if [ ! -n "$1" ]
then