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
# lib/api_constraints.rb | |
class ApiConstraints | |
def initialize(options) | |
@version = options[:version] | |
@default = options[:default] | |
@domain = options[:domain] | |
end | |
def matches?(req) |
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 { |
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
gem 'devise', '3.2.4' | |
gem 'simple_token_authentication', '1.5.0' |
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
msgid "" | |
msgstr "" | |
"Project-Id-Version: Lingohub 1.0.1\n" | |
"Report-Msgid-Bugs-To: support@lingohub.com \n" | |
"Last-Translator: Marko Bošković <marko@lingohub.com>\n" | |
"Language: de\n" | |
"MIME-Version: 1.0\n" | |
"Content-Type: text/plain; charset=UTF-8\n" | |
"Content-Transfer-Encoding: 8bit\n" | |
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
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
<?xml version="1.0" encoding="utf-8"?> | |
<root> | |
<data name="Common_AuthenicationFailed" xml:space="preserve"> | |
<value>Authentifikation fehlgeschlagen</value> | |
</data> | |
<!-- single line comment --> | |
<data name="Common_Billable" xml:space="preserve"> | |
<value>Verrechenbar</value> | |
</data> | |
<!-- multi |
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
. . . | |
group :test do | |
gem 'cucumber-rails', '1.4.1', :require => false | |
gem 'json_spec', '1.1.2' | |
. . . |
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 | |
// the original of this code can be found on: | |
// http://www.mind-it.info/2010/02/22/a-simple-approach-to-localization-in-php/ | |
function localize($phrase) { | |
/* Static keyword is used to ensure the file is loaded only once */ | |
static $translations = NULL; | |
if (is_null($translations)) { | |
$lang_file = '/lang/' . $_SESSION["locale"] . '.txt'; | |
/* If no instance of $translations has occured load the language 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
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 |
NewerOlder