Skip to content

Instantly share code, notes, and snippets.

@timols
timols / typhoeus_segfault.rb
Created August 1, 2011 15:48
segfault with curl + libcurl
/usr/local/rvm/gems/ree-1.8.7-2010.02/gems/typhoeus-0.2.4/lib/typhoeus/multi.rb:21: [BUG] Segmentation fault
ruby 1.8.7 (2010-04-19 patchlevel 253) [i686-linux], MBARI 0x8770, Ruby Enterprise Edition 2010.02
Typhoeus::Easy.new.curl_version => "libcurl/7.21.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15"
@timols
timols / about.md
Created August 9, 2011 21:28 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@timols
timols / redis-server
Created September 4, 2011 20:16 — forked from lsbardel/redis-server-for-init.d-startup
Init.d Redis script for Ubuntu
#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db
@timols
timols / ruby-hough.rb
Created September 26, 2011 00:51 — forked from rondale-sc/ruby-hough.rb
The hough transform in ruby. Only looks for straight black lines.
begin
['oily_png', 'pp'].each do |g|
require g
end
rescue LoadError => e
puts "Could not load '#{e}'"; exit
end
class Hough
Convert = "/usr/local/bin/convert"
@timols
timols / ruby_haversine.rb
Created March 29, 2013 01:15
Ruby implementation of the haversine distance formula
##
# Haversine Distance Calculation
#
# Accepts two coordinates in the form
# of a tuple. I.e.
# geo_a Array(Num, Num)
# geo_b Array(Num, Num)
# miles Boolean
#
# Returns the distance between these two
@timols
timols / min_pyramid_path.rb
Last active December 16, 2015 06:38
Given a pyramid of positive integers, calculate the min sum that can be created by traversing the pyramid and selecting either the left or right element on the next row.
#!/usr/bin/env ruby
# Construct a Pyramid structure
# from text, given the following format
#
# 1
# 1 2
# 1 2 3
# 1 2 3 4
class Pyramid
class Maven30 < Formula
desc "Java-based project management"
homepage "https://maven.apache.org/"
url "https://www.apache.org/dyn/closer.cgi?path=maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz"
sha256 "d98d766be9254222920c1d541efd466ae6502b82a39166c90d65ffd7ea357dd9"
conflicts_with "maven", :because => "Differing versions of same formula"
depends_on :java
@timols
timols / keybase.md
Created November 15, 2019 16:03
Keybase Registration

Keybase proof

I hereby claim:

  • I am timols on github.
  • I am timols (https://keybase.io/timols) on keybase.
  • I have a public key whose fingerprint is 5C28 A0A6 FF99 BAEC E617 4664 5C5B B755 4227 E79F

To claim this, I am signing this object: