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
asdfasdfasdfsadfsadf |
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
source 'https://rubygems.org' | |
gem 'rails', '3.2.0' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
# Gems used only for assets and not required | |
# in production environments by default. | |
group :assets do |
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
var total_time = function() { | |
var durs_sourse = [], total = 0; | |
$('.duration').each(function(i,v){ durs_sourse.push( $(v).html() ); }) | |
for(v in durs_sourse) { | |
total += parseInt(durs_sourse[v].split(':')[0]*60) + parseInt(durs_sourse[v].split(':')[1]) | |
} | |
return 'всего ' + (total/(60*60)).toFixed() + ' час. ' + (total%(60)) + ' мин.'; | |
} |
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
counter = 0; | |
$('#desc-show p').each( function(i,val){ | |
var str = $(val).text(); | |
str = str.split('-')[1]; | |
if(typeof(str) == 'string') { | |
str = str.split(' ')[1]; | |
counter += parseInt( str ); | |
console.log(str); | |
} | |
}); |
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
var extend = function(child, parent) { | |
for (var key in parent) { | |
if(parent.hasOwnProperty(key)) child[key] = parent[key]; | |
} | |
function ctor() { | |
this.constructor = child; | |
} | |
ctor.prototype = parent.prototype; |
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
{ | |
"caret_style": "smooth", | |
"detect_slow_plugins": false, | |
"draw_centered": true, | |
"font_size": 12, | |
"ignored_packages": | |
[ | |
], | |
"tab_size": 2, | |
"vintage_ctrl_keys": true, |
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
this.load = function(callback, act) { | |
if(act || __images.length === 0) callback.call(); | |
var cover = document.createElement('div'), | |
counter = 0; | |
cover.id = 'cover'; | |
cover.style.width = wwh()[0]+'px'; | |
cover.style.height = wwh()[1]+'px'; | |
cover.innerHTML = ' \ |
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
setInterval(function() { | |
d0 = app.divers[0]; | |
d1 = app.divers[1]; | |
d2 = app.divers[2]; | |
console.log(d0, d1, d2); | |
console.log(d0.air.toFixed(2)+' ', d1.air.toFixed(2)+' ', d2.air.toFixed(2)); | |
}, 500); |
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
class Dashboard::AttachmentsController < ApplicationController | |
before_filter :prepare | |
FORMS = [Question]# Ask Application Feedback Occupation] | |
def create | |
@attachment = Attachment.new params[:attachment] | |
unless @access_error | |
@attachment.attachable_id = @temp_attachable_id |
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
class Attachment < ActiveRecord::Base | |
before_create :default_name | |
attr_accessible :file, :attachable_id | |
mount_uploader :file, FileUploader | |
belongs_to :attachable, polymorphic: true | |
def default_name |
OlderNewer