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
Array.prototype.last = function() { | |
return this[this.length-1]; | |
} | |
Array.prototype.random = function () { | |
return this[Math.floor(Math.random()*this.length)]; | |
} | |
String.prototype.sample = function(start,end) { | |
res=""; |
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
# put this file in config/initializers | |
# | |
# USAGE: | |
# in your paperclip model: | |
# has_attached_file :document | |
# before_post_process { |c| transliterate_file_name(:document) } | |
module TransliteratePaperclip | |
def transliterate_file_name(paperclip_file) |
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
UPDATE telcountry_table | |
SET country = | |
CASE | |
WHEN left(telnum,4) = 0093 THEN 'Afghanistan' | |
WHEN left(telnum,5) = 00355 THEN 'Albania' | |
WHEN left(telnum,5) = 00213 THEN 'Algeria' | |
WHEN left(telnum,5) = 00376 THEN 'Andorra' | |
WHEN left(telnum,5) = 00244 THEN 'Angola' | |
WHEN left(telnum,6) = 001264 THEN 'Anguilla' | |
WHEN left(telnum,6) = 006721 THEN 'Antarctica' |
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
# Additional translations at http://github.com/plataformatec/devise/wiki/I18n | |
# Devise v1.4.2 polish translation by @rogal111 | |
pl: | |
errors: | |
messages: | |
expired: "stracił ważność, wyślij zapytanie o nowy" | |
not_found: "nie znaleziono" | |
already_confirmed: "już został aktywowany, możesz się zalogować" | |
not_locked: "nie był zablokowany" |