Skip to content

Instantly share code, notes, and snippets.

@gaboesquivel
gaboesquivel / placeholder.js
Created April 2, 2012 23:12 — forked from senko/placeholder.js
HTML input field placeholder handling
/* Hide/show placeholder text in an input field while it's empty
* To use, add data-placheholder="placeholder text" to your fields
* Eg: <input type="text" id="email" value="" data-placeholder="Enter your e-mail">
*/
$('input[data-placeholder]').each(function(){
$(this)
.bind('focus', function() {
if ($(this).val() == $(this).data('placeholder'))
$(this).val('');
})
@gaboesquivel
gaboesquivel / gist:3501630
Created August 28, 2012 18:16 — forked from anonymous/gist:2523336
Changing author info
#!/bin/sh
git filter-branch --env-filter '
an="$GIT_AUTHOR_NAME"
am="$GIT_AUTHOR_EMAIL"
cn="$GIT_COMMITTER_NAME"
cm="$GIT_COMMITTER_EMAIL"
if [ "$GIT_COMMITTER_EMAIL" = "[email protected]" ]
cycle_rtc = (e) ->
$(e).cycle
fx: "fade"
speed: 'fast'
timeout: 0
next: '.next'
prev: '.prev'
pager: '#rtc_pager ul'
pagerEvent: "click"
after: on_after
:coffeescript
window.RTC = {}
RTC.completedSteps = #{ current_user.rtc_completed_steps rescue [] }
%section#rtc_container.tabs_container{ class: current_locale }
#slider_arrow
.prev.arrow
- if current_user && can?(:update, profile)
.next.arrow
-elsif !current_user || (current_user && current_user.profile.id != profile.id)
@gaboesquivel
gaboesquivel / controller_helpers.rb
Created November 7, 2012 23:52
file you need to comment
module AbTests::ControllerHelpers
# def randomize_ab_version
# Random.rand(2) == 0 ? "current" : "rtc"
# end
# def get_ab_version
# if params[:ab_version]
# cookies[:ab_version] = params[:ab_version]
# else
@gaboesquivel
gaboesquivel / controller_helpers.rb
Created November 8, 2012 00:06
Esto tambien lo soluciona.....
module AbTests::ControllerHelpers
def randomize_ab_version
"rtc"
end
def get_ab_version
if params[:ab_version]
cookies[:ab_version] = params[:ab_version]
else
- state = instance.favorite?(current_user) ? "favorite" : "not_favorite"
- position != 'right'
#awesome_counter{class: [position, state, "#{instance.id}_#{instance.class.to_s.parameterize}"], "data-entry-id" => "#{instance.class.to_s.parameterize}_#{instance.id}", "data-current_user" => current_user.blank? ? 'false' : 'true', "data-state" => state}
%span
.favorite_count
- if state == "favorite"
.counter.favorite
= instance.favorites.count
= image_tag "awesome/awesome-counter-save.png"
.state.hide
- state = instance.favorite?(current_user) ? "favorite" : "not_favorite"
- position |= 'right'
#awesome_counter{class: [position, state, "#{instance.id}_#{instance.class.to_s.parameterize}"], "data-entry-id" => "#{instance.class.to_s.parameterize}_#{instance.id}", "data-current_user" => current_user.blank? ? 'false' : 'true', "data-state" => state}
%span
.favorite_count
- if state == "favorite"
.counter.favorite
= instance.favorites.count
= image_tag "awesome/awesome-counter-save.png"
.state.hide
@mixin main_tabs_properties($image, $color: $grayLight)
width: 130px
a
background:
image: $image
repeat: no-repeat
&.ui-tabs-selected, &:hover
a
background-position: -8px 10px
&.ui-tabs-selected
/**
* 3D Now In Beta Ribbon
*/
/*@font-face {
font-family: Collegiate;
src: url("Collegiate.ttf");
}*/
.ribbon-holder {