Skip to content

Instantly share code, notes, and snippets.

View archfear's full-sized avatar

Dan Dofter archfear

  • BrightHire
  • San Francisco, CA
View GitHub Profile
@archfear
archfear / gist:59328
Created February 6, 2009 10:42 — forked from rails/gist:58761
var DateHelper = {
// Takes the format of "Jan 15, 2007 15:45:00 GMT" and converts it to a relative time
// Ruby strftime: %b %d, %Y %H:%M:%S GMT
time_ago_in_words_with_parsing: function(from) {
var date = new Date;
date.setTime(Date.parse(from));
return this.time_ago_in_words(date);
},
time_ago_in_words: function(from) {
##
# test/spec/mini 2
# http://gist.github.com/25455
# [email protected]
# file:lib/test/spec/mini.rb
#
def context(*args, &block)
return super unless (name = args.first) && block
require 'test/unit'
klass = Class.new(defined?(ActiveSupport::TestCase) ? ActiveSupport::TestCase : Test::Unit::TestCase) do
file 'Gemfile', <<-GEMS
source 'http://gemcutter.org'
gem "rails", "3.0.0.beta3"
gem "bson_ext"
gem "mongoid", "2.0.0.beta4"
gem "haml", "3.0.0.rc.2"
gem "compass", "0.10.0.rc4"
gem "inherited_resources"
group :test do
@archfear
archfear / install-wget2
Last active March 18, 2023 20:37 — forked from davdenic/install-wget2
Install wget2 on macos
git clone https://gitlab.com/gnuwget/wget2.git
cd wget2
git checkout v2.0.1
brew install automake brotli doxygen gettext gettext gnutls gpgme libidn2 libmicrohttpd libpsl libtool lzlib nettle nghttp2 pandoc pcre pkg-config texinfo xz zstd
./configure --with-bzip2 --with-lzma --without-libhsts
make
make check
make install