Skip to content

Instantly share code, notes, and snippets.

View lukaszx0's full-sized avatar

Lukasz Strzalkowski lukaszx0

  • Column
View GitHub Profile
@lukaszx0
lukaszx0 / mini.rb
Created November 7, 2010 21:50 — forked from defunkt/mini.rb
##
# test/spec/mini 5
# http://gist.github.com/307649
# [email protected]
#
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
def self.test(name, &block)
@lukaszx0
lukaszx0 / gist:605049
Created September 30, 2010 18:21 — forked from dje/gist:72840
#! /usr/bin/env ruby
=begin
backshot.rb is a Ruby program driving
Amazon EBS <http://aws.amazon.com/ebs/>
to generate snapshots for backup purposes.
Hourly, daily, weekly, and monthly snapshots
are generated by default.

World famous FFFFFFFFUUUUUUUUU autotest-growl icon set

fucons

Passed: EWBTE

Failed: problem?

require 'test_helper'
class ProductsIntegrationTest < ActionController::IntegrationTest
test "browse product page" do
product = Factory.create(:product)
visit product_path(product)
within(:css, ".products.show .product") do
assert_content "Textmate", "h3 a"

Writing Commit Messages

One line summary (< 50c)

Longer description (wrap at 72c)

Summary

module Tty extend self
def blue; bold 34; end
def white; bold 39; end
def red; underline 31; end
def reset; escape 0; end
def bold n; escape "1;#{n}" end
def underline n; escape "4;#{n}" end
def escape n; "\033[#{n}m" if STDOUT.tty? end
end
@lukaszx0
lukaszx0 / gist:406300
Created May 19, 2010 13:28
Ticket estimated to 2h done in 2 minutes by changing 2 lines
diff --git a/app/controllers/ads_controller.rb b/app/controllers/ads_controller.rb
index fa42e94..19ea145 100644
--- a/app/controllers/ads_controller.rb
+++ b/app/controllers/ads_controller.rb
@@ -92,6 +92,7 @@ class AdsController < ApplicationController
def update
@ad.attributes = params[:ad]
@ad.attach_images(params[:ad_images_ids]) if(params[:ad_images_ids])
+ @ad.checked = false
@ad.save!
@lukaszx0
lukaszx0 / 1_feed_spec.md
Created May 18, 2010 09:08
Anounz.de partner feed specyfication

Feed Specification

Exposing file

Our feed parser can use HTTP or FTP to download your feed file. Althought HTTP is prefered.

XML Structure