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
namespace :s3_files do | |
desc 'Reuploads the s3 files from the old locations' | |
task :reupload => :environment do | |
ok = 0 | |
not_ok = 0 | |
puts ' ', '-----', 'Re-uploading User avatars' | |
User.where('avatar IS NOT NULL').each do |user| | |
new_path = "uploads/user/#{user.uuid.to_s}/avatar" |
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
require 'carrierwave/processing/mime_types' | |
class AvatarUploader < CarrierWave::Uploader::Base | |
include CarrierWave::MiniMagick | |
include CarrierWave::Processing::MiniMagick | |
include CarrierWave::MimeTypes | |
# Changes the file content_type using the mime-types gem | |
process :set_content_type |
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
$(document).ready(function() { | |
var $container = $('#translators') | |
$($container).isotope({ | |
itemSelector: '.item', | |
masonry: { | |
columnWidth: 280 | |
} | |
}) |
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
greetings: | |
hello: | |
world: Hello World! | |
friend: Hello Friend! | |
user: Hello %1, welcome to %2 | |
inbox: | |
messages: !!pl | |
0: Your inbox is empty. | |
1: You have one message in your inbox. |
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 Base | |
def listen | |
puts "think: interesting stuff ..." | |
end | |
end | |
class Attendee | |
include Base | |
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
--- | |
en: | |
greetings: | |
hello: | |
world: Hello World! | |
friend: Hello Friend! | |
user: Hello %{user} | |
inbox: | |
messages: | |
one: You have one message in your inbox. |
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
<?php | |
// source: http://fuelphp.com/dev-docs/classes/lang.html | |
// Example of a language file: | |
return array( | |
'hello' => 'Hello :name', | |
'something'=> 'something :name!', | |
'test'=> array('hello' => 'Hello', 'something' => 'Plop') // Group | |
); |
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
<?php | |
//source: http://web-technos.blogspot.com/2013/04/internationalization-with-fuelphp.html | |
return array( | |
'language' => 'en', // Default language | |
'language_fallback' => 'en', // Fallback language when file isn't available for default language | |
'locale' => 'en_US', // PHP set_locale() setting, null to not set | |
'locales' => array( | |
'en' => 'en_US', | |
'fr' => 'fr_FR' |
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
<?php | |
return array( | |
'monday' => 'Montag', | |
'tuesday' => 'Dienstag', | |
'wednesday' => 'Mittwoch', | |
'thursday' => 'Donnerstag', | |
'friday' => 'Frietag', | |
'saturday' => 'Samstag', | |
'sunday' => 'Sontag' |
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
<?php | |
session_start(); | |
if (isset($_GET["locale"])) { | |
$locale = $_GET["locale"]; | |
} | |
else if (isset($_SESSION["locale"])) { | |
$locale = $_SESSION["locale"]; | |
} | |
else { |