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
=javascript_tag do | |
var columns = []; | |
- current_object.rounds.each do |round| | |
==columns.push(new SpreadSheetColumn("#{round.name}",#{round.id})); | |
var rows = []; | |
- current_object.share_holders.each do |holder| | |
==rows.push(new SpreadSheetRow("#{holder.name}",#{holder.id},#{current_object.rounds.map{|t| holder.ownerships.of(t).amount}.inspect})); | |
window.dataTable = new SpreadSheetTable(columns,rows); |
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 RiskFree | |
.... | |
def get_date(date) | |
date = orig_date = date.to_date | |
year = date.year | |
data = fetch(year) | |
result = nil | |
counter = 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
require 'yaml' | |
require 'fileutils' | |
require 'bundler/capistrano' | |
set :user, 'root' | |
set :domain, 'greenerequity.com' | |
set :applicationdir, "/var/rails/#{domain}" | |
set :scm, 'git' | |
set :repository, "[email protected]:OBSLabs/greenerequity.git" |
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
[21] pry(main)> p = HTTPClient.new.get "http://www.kinopoisk.ru/film/277537/", nil, { 'User-Agent'=>'a', 'Accept-Encoding'=>'a' } | |
=> #<HTTP::Message:0xcc4c9c4 | |
@http_body= | |
#<HTTP::Message::Body:0xcc4c974 | |
@body= | |
"<html>\r\n<head><title>302 Found</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>302 Found</h1></center>\r\n<hr><center>nginx/1.2.1</ce | |
@chunk_size=nil, | |
@positions=nil, | |
@size=0>, | |
@http_header= |
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 BlackScholesAlgorithm | |
def initialize(options) | |
# options.assert_valid_keys(:stock_price, :exercise_price, :expected_term, :comparables) | |
@stock_price = options[:stock_price] || raise("stock_price is empty") | |
@exercise_price = options[:exercise_price] || raise("exercise_price is empty") | |
@term = options[:expected_term] | |
@public_companies_tickers = options[:comparables] | |
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
class BlackScholesAlgorithm | |
def initialize(option_grant) | |
@option_grant = option_grant | |
@stock_price = @option_grant.stock_price | |
@exercise_price = @option_grant.exercise_price | |
@term = @option_grant.expected_term | |
@grant_date = @option_grant.grant_date | |
company = @option_grant.equity_plan.company | |
@public_companies_tickers = company.public_companies.map(&:ticker) |
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
Greenerequity::Application.routes.draw do | |
get "users/index" | |
get "forfeitures/index" | |
match "zendesk/login" => "zendesks#login" # will match /zendesk/login | |
match "zendesk/logout" => "zendesks#logout" # will match /zendesk/logout | |
get "logout" => "sessions#destroy", :as => "logout" |
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
@Video = | |
current: -> _V_('my_video') if $('video:visible').length | |
resource: -> $("[href=#{location.hash}]").data('href') | |
class @Episode | |
formats = [ | |
/^(.+?)s(\d{1,2})e(\d{1,2})/i | |
/^(.+?)(\d{1,2})[x.](\d{1,2})/i | |
/^(.+?)Season (\d{1,2}) Episode (\d{1,2})/i | |
] |
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 WikiPopup | |
constructor: (@elSelector, @popupSelector) -> | |
@wikiElement = $(@elSelector) | |
@popup = $(@popupSelector) | |
@init() | |
init: -> | |
#preload spinner |
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
= render partial: 'articles/show/shared/meta' | |
.get-slider_main{ class: 'static-slider' } | |
.get-carousel.carousel-top | |
.jcarousel | |
%ul | |
%li | |
.get-block_wrapper{class: "#{@article.color_scheme}"} | |
.get-block_content.grey_grad | |
.block-wrapper |