Skip to content

Instantly share code, notes, and snippets.

View ckozus's full-sized avatar

Carlos Kozuszko ckozus

  • Insignia
  • Tucumán, Argentina
View GitHub Profile
require File.dirname(__FILE__) + '/../../spec_helper'
describe Admin::SuscriptoresHelper do
#Delete this example and add some real ones or delete this file
it "should include the Admin::SuscriptoresHelper" do
included_modules = self.metaclass.send :included_modules
included_modules.should include(Admin::SuscriptoresHelper)
end
puts "hola mundo".class
puts "hola mundo".upcase
puts "curso: ruby on rails. nivel básico".size
puts 2 + 3
puts 2.+(3)
require 'rubygems'
require 'open-uri'
require 'feed-normalizer'
require 'mirrored'
require 'json'
class YahooTermExtractor
def self.api_id=(value)
@@api_id = value
end
@ckozus
ckozus / tar.cmd
Created September 1, 2008 16:01
tar wrapper script for windows using 7zip
@call ruby r:\tar.rb %*
require 'rubygems'
require 'r_weather'
RWeather.partner_id = "xxxxxxxxxx"
RWeather.key = "yyyyyyyyyyyyyyyy"
locations = RWeather.search('tucuman') # that's where I'm from :)
unless locations.empty?
locations.each_with_index do |location, i|
puts "#{i}) #{location.id} - #{location.name}"
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
require 'test/unit'
class ProyectosControllerTest < ActionController::TestCase
tests Admin::ProyectosController
fixtures :proyectos
test_administrate_me do |test|
test.set_params :create, :proyecto => {:nombre => 'Zoom', :estado => Proyecto::ESTADOS.first, :inicio => Date.today}
end
end
@ckozus
ckozus / gist:23313
Created November 9, 2008 18:42 — forked from insignia/gist:23312
package 'openssl' do
type 'make'
default 'source'
version 'source' do
download 'http://...'
# hooks
before :download { }
after :download { }
<% content_for :titlebar do %>
<%= render :partial => 'commons/titlebar' %>
<ul>
<% Video::NAVIGATION_LABELS.each do |label| %>
<li><%= link_to_unless_current label.titleize, videos_path(:label => label) %></li>
<% end %>
</ul>
<% end %>
@ckozus
ckozus / pre_commit_hook-jammit
Created May 15, 2011 23:57 — forked from mikem/pre_commit_hook-jammit
git pre-commit hook for Jammit
#!/usr/bin/env ruby
require 'rubygems'
require 'jammit'
print "Jammit check... "
status_before = %x[git status --porcelain --untracked-files=no]
Jammit.package!
status_after = %x[git status --porcelain --untracked-files=no]
jammit_files = (status_after.split("\n") - status_before.split("\n")).map { |f| f.split[1] }
@ckozus
ckozus / ParsingError.mirah
Created July 10, 2011 19:22
rake compile output
package com.insignia4u.ParsingError
import android.app.Activity
class ParsingError < Activity
def onCreate(state)
super state
# Unmatched parenthesis on the following line.
setContentView (R.layout.main
end