This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#bash_profile: | |
alias reload='source ~/.bash_profile' | |
alias ll="ls -l" | |
alias la="ls -a" | |
alias lla="ls -la" | |
alias rm='rm -i' | |
alias srm='srm -i' | |
alias m=more | |
alias ..="cd .." | |
alias l="ls -AFhl" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make bash autocomplete with up arrow | |
bind '"\e[A":history-search-backward' | |
bind '"\e[B":history-search-forward' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ActionView | |
module Helpers | |
module UrlHelper | |
def button_to(name, options = {}, html_options = {}) | |
html_options = html_options.stringify_keys | |
convert_boolean_attributes!(html_options, %w( disabled )) | |
method_tag = '' | |
if (method = html_options.delete('method')) && %w{put delete}.include?(method.to_s) | |
method_tag = tag('input', :type => 'hidden', :name => '_method', :value => method.to_s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#bash_profile: | |
alias reload='source ~/.bash_profile' | |
alias ll="ls -l" | |
alias la="ls -a" | |
alias lla="ls -la" | |
alias rm='rm -i' | |
alias srm='srm -i' | |
alias m=more | |
alias ..="cd .." | |
alias l="ls -AFhl" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ENV["RAILS_ENV"] = "test" | |
require File.expand_path(File.dirname(__FILE__) + "/../config/environment") | |
require 'test_help' | |
require 'active_resource/http_mock' | |
class Test::Unit::TestCase | |
self.use_transactional_fixtures = true | |
self.use_instantiated_fixtures = false | |
def self.all_fixtures |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PagesController < ApplicationController | |
verify :params => :name, :only => :show, :redirect_to => :root_path | |
before_filter :set_locale, :ensure_valid, :only => :show | |
def show | |
render :template => "pages/#{current_page}" | |
end | |
protected | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module SimpleCachingTTL | |
CACHETIME = 24 * 3600 # Once per day | |
def cache(text, path) | |
FileUtils.mkdir_p(File.dirname(path)) | |
File.open(path, 'w') { |f| f.write( text ) } | |
text | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static: | |
controller: pages | |
action: show | |
view: name # El parametro que indica el nombre del contenido estático. | |
default: | |
keywords: "charifuflis" | |
en: | |
title: I need my seo, dear web developer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
# Version 2, December 2004 | |
# | |
# Copyright (C) 2004 Sam Hocevar | |
# 14 rue de Plaisance, 75014 Paris, France | |
# Everyone is permitted to copy and distribute verbatim or modified | |
# copies of this license document, and changing it is allowed as long | |
# as the name is changed. | |
# | |
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
if ARGV[0].nil? || ARGV[1].nil? | |
puts "Error. Uso: #{$0} wmv_folder/ flv_folder/" | |
end | |
Dir.open(ARGV[0]).entries.sort.each do |entry| | |
if [".", ".."].include? entry | |
next | |
end |
OlderNewer