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
s="IyBUaGFua3MgZm9yIGxvb2tpbmcgYXQgbXkgY29kZ | |
S4KIwojIENvcHlyaWdodCAoQykgMjAwMiAgQ2hyaXN0a | |
WFuI E 5 l d Wtpc | |
mNoZ W 4 gP G N obmV | |
1a2l y Y 2hlb k B nbWF | |
pbC5 j b 20+CiM K I yBUa | |
GlzI H Byb2dyYW 0 gaXM | |
gZnJ l Z SBzb2Z0d2F y Z Tsge | |
W91I G NhbiByZWRpc3 R yaWJ | |
1dGU g aXQgYW5kL29yCi M g bW9k |
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"?> | |
<opml version="2.0"> | |
<head> | |
<title>My feedly feeds</title> | |
</head> | |
<body> | |
<outline text="Codegram"> | |
<outline text="JavaScript is Sexy | JavaScript is Sexy" htmlUrl="http://javascriptissexy.com" type="rss" xmlUrl="http://javascriptissexy.com/feed/"/> | |
<outline text="Katz Got Your Tongue?" htmlUrl="http://yehudakatz.com" type="rss" xmlUrl="http://yehudakatz.com/feed/"/> |
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
FOO = 'GLOBAL NAMESPACE' | |
module A | |
FOO = "IN A" | |
module B | |
FOO = 'IN B' | |
def self.foo | |
p ::FOO | |
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
def forfeited_amount | |
sum = 0 | |
all_grants.each do |grant| | |
sum += grant.forfeitures.between(from_date, to_date).sum(:amount) | |
end | |
sum | |
end | |
def second_forfeited_amount | |
all_grants.joins(:forfeitures) |
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
[46] pry(main)> date = _ | |
=> Thu, 02 Jun 2011 | |
[47] pry(main)> date + 1.year | |
=> Sat, 02 Jun 2012 | |
[48] pry(main)> 1.year | |
=> 31557600.0 | |
[49] pry(main)> days_in_year = 1.year / 60.0 / 60.0 / 24.0 | |
=> 365.25 | |
[50] pry(main)> date + days_in_year | |
=> Fri, 01 Jun 2012 |
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
context "when prefered has to pay it's cap" do | |
let!(:shareholder1){ company.share_holders.create!(name: 'Darth Vader') } | |
let!(:ownerships){ [series_a_stock.ownerships.create(amount: 1e5), common_stock.ownerships.create(amount: 2e5),option_grant ] } | |
let(:returns) do | |
[ | |
[{ round: Logarithm::RoundProxy.new(series_a_stock), money: 1e5, money_per_share: 1 } ], #preference | |
[{ round: Logarithm::RoundProxy.new(common_stock), money: 1e5, money_per_share: 0.5 }], #excercise option | |
[ #cap |
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
<script> | |
$(document).ready(function(){ | |
$('#buy-automated').click(function(){ | |
var token = function(res){ | |
console.log('Got token ID:', res.id); | |
}; | |
StripeCheckout.open({ | |
key: 'pk_Y9MZnemHi4X5Anj423q4m79gfaDqP', | |
address: 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
=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, "git@github.com:OBSLabs/greenerequity.git" |
NewerOlder