Skip to content

Instantly share code, notes, and snippets.

View pama's full-sized avatar

Paulo Abreu pama

View GitHub Profile
@pama
pama / gist:65bcf526923d369c258f
Created December 18, 2014 09:41
will_paginate switching page by persisting a search form
# We need to trigger click event for pagination links and search submit. Also, we need to post
# to the entry point when searching, as it will avoid handling the search in 2 different places.
#
# The submit click event resets the page hidden field. The link event will get the page
# number, updates the page hidden field and submits the form.
# routes.rb
get 'will_paginate', to: 'will_paginate#index'
post 'will_paginate', to: 'will_paginate#index'
@pama
pama / gist:b99e1ceaa849b6a67c05
Last active August 29, 2015 14:11
Countdown timer example (not accurate, though)
<html>
<head>
<script src="http://code.jquery.com/jquery-2.1.1.js"></script>
</head>
<body>
<div id="timer"></div>
<script>
@pama
pama / devise.pt.yml
Last active August 20, 2023 12:07
European Portuguese translation for devise
# Additional translations at https://github.com/heartcombo/devise/wiki/I18n
# European Portuguese translations for devise
#
# The translation does not respect the 1990 agreement
pt:
devise:
confirmations:
confirmed: "A sua conta foi confirmada com sucesso."
send_instructions: "Dentro de alguns minutos irá receber um e-mail com instruções para confirmar a sua conta."