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
if(document.getElementById('currentyear').value <= 2013) { | |
if(document.getElementById('currentmonth').value == 12) { | |
document.getElementById('currentmonth').value=13; | |
} | |
else if(document.getElementById('currentmonth').value == 11) { | |
document.getElementById('currentmonth').value=12; | |
} | |
else if(document.getElementById('currentmonth').value == 10) { | |
document.getElementById('currentmonth').value=11; |
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
gr: | |
errors: | |
messages: | |
expired: "έχει λήξει, παρακαλούμε ζητήστε νέο" | |
not_found: "δεν βρέθηκε" | |
already_confirmed: "έχει ήδη επιβεβαιωθεί, παρακαλούμε δοκιμάστε να ξανασυνδεθείτε" | |
not_locked: "δεν είναι κλειδωμένο" | |
not_saved: | |
one: "" | |
other: "" |
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
def subscribe | |
subscriber = Subscriber.where(email: params[:newsletter_email]).first | |
if subscriber | |
if subscriber.approval != "Approved" | |
NewsletterMailer.send_code_confirm(subscriber.email, subscriber.code_confirmation).deliver | |
redirect_to root_url, notice: "Σας εστάλη ένα email επιβεβαίωσης." | |
else | |
redirect_to root_url, notice: "Το email σας υπάρχει ήδη στη λίστα μας. Σας ευχαριστούμε για την εγγραφή!" | |
end | |
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
#!/bin/bash | |
case $1 in | |
start) | |
echo "Starting crtmpd..."; | |
cd /root/crtmp/;exec ./crtmpserver ./configs/mine.lua & | |
echo "crtmpd started."; | |
sleep 2; | |
echo $(lsof -t -i :1935) > /var/run/crtmpd.pid; | |
echo $(lsof -t -i :1935); |
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 'rubygems' | |
require 'spork' | |
Spork.prefork do | |
# This file is copied to spec/ when you run 'rails generate rspec:install' | |
ENV["RAILS_ENV"] ||= 'test' | |
require File.expand_path("../../config/environment", __FILE__) | |
require 'rspec/rails' | |
require 'capybara/rspec' | |
require 'rspec/autorun' |
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
upstream unicorn { | |
server unix:/tmp/unicorn.escortamazons.sock fail_timeout=0; | |
} | |
server { | |
server_name escortamazons.com; | |
rewrite ^ $scheme://www.escortamazons.com$request_uri permanent; | |
# permanent sends a 301 redirect whereas redirect sends a 302 temporary redirect | |
# $scheme uses http or https accordingly | |
} |
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
def omniauth_facebook | |
OmniAuth.config.mock_auth[:facebook] = OmniAuth::AuthHash.new({ | |
:provider => 'facebook', | |
:uid => '1234567', | |
:info => { | |
:nickname => 'jbloggs', | |
:email => '[email protected]', | |
:name => 'Joe Bloggs', | |
:first_name => 'Joe', | |
:last_name => 'Bloggs', |
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
VCR.configure do |c| | |
c.ignore_localhost = true | |
c.cassette_library_dir = Rails.root.join("spec", "vcr") | |
c.hook_into :webmock | |
end | |
RSpec.configure do |c| | |
c.treat_symbols_as_metadata_keys_with_true_values = true | |
c.around(:each, :vcr) do |example| | |
name = example.metadata[:full_description].split(/\s+/, 2).join("/").underscore.gsub(/[^\w\/]+/, "_") |
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
... | |
describe "GET 'delete'" do | |
before :each do | |
@upload = create(:upload) | |
end | |
it "deletes the upload" do | |
expect{ | |
delete :destroy, id: @upload | |
}.to change(Upload, :count).by(-1) |
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
configuration= | |
{ | |
daemon=false, | |
pathSeparator="/", | |
logAppenders= | |
{ | |
{ | |
name="console appender", | |
type="coloredConsole", |
OlderNewer