Skip to content

Instantly share code, notes, and snippets.

@jvenator
jvenator / gist:9672772a631c117da151
Last active April 28, 2024 01:09
PDFtk Server Install Workaround for Mac OS X

Installing PDFtk Server edittion on your Mac

This workaround install is necessary because PDFtk was pulled from homebrew-cask due to issues with it aggressively overwriting file permissions that could impact other installed libraries. See this homebrew-cask issue.
The following steps worked on Mac OS X 10.10.1 with a standard brew installation for the PDFtk Mac OS X server libary version 2.02.
All Terminal commands separated by a full line space. Some commands wrap into multiple lines.

Download and extract the Mac OS X server install pacakge

{
"total": 104,
"page": 3,
"crunchbase_url": "http://www.crunchbase.com/search?geo=los angeles ca\u0026range=5",
"results": [
{
"name": "Zone Ventures",
"permalink": "zone-ventures",
"crunchbase_url": "http://www.crunchbase.com/financial-organization/zone-ventures",
"namespace": "financial-organization",
@jvenator
jvenator / you_tube_scaper_basic.rb
Created November 18, 2012 19:39
YouTube Scraping
require 'nokogiri'
require 'open-uri'
puts "What YouTube URL do want information on?"
url = gets.chomp
doc = Nokogiri::HTML(open(url))
subscribers = doc.css('span.stat-value')[0].content
@jvenator
jvenator / hello_world.rb
Created November 18, 2012 18:35
Sample gist for Angelo
puts "hello world"
@jvenator
jvenator / homework_test_2.rb
Created October 17, 2012 21:34
Joseph D. - Flatiron Homework
# some more homework material
@jvenator
jvenator / gist:3907908
Created October 17, 2012 20:21
10_17_12 - song_library.rb
def assert_equal(actual, expected)
if expected == actual
puts 'pass'
else
puts "fail: expected #{expected}, got #{actual}"
end
end
def assert(statement)
if statement
h1 {
font-size: 3em;
}
div#right_col{
width: 212px;
}
div#right_col img {
border: 6px solid #403051;
<section id="links" class = "link" align="center">
<div class="center">
<h2 class="title"><span>Coder Cred</span></h2>
</div>
<div class="coder-cred center">
<ul>
<li class="github"><a href="http://github.com/##"></a></li>
<li class="codeschool"><a href="http://www.codeschool.com/users/##" ></a></li>
<li class="coderwall"><a href="https://coderwall.com/##" ></a></li>
<li class="stackoverflow"><a href="http://stackoverflow.com/users/1496757/##" ></a></li>
@jvenator
jvenator / gist:2008472
Created March 9, 2012 20:21
packages/documents_controller options
class Packages::DocumentsController < ApplicationController
def create
@package = Package.find(params[:package_id])
Document.where(:id => params[:id].split(",")).each do |d|
@package.add_document(d)
end
@documents = Document.where(:id => params[:id].split(",")).collect do |d|
@package.add_document(d)
end
def destroy
@jvenator
jvenator / gist:1588334
Created January 10, 2012 10:12
Leveraged Returns In Real Estate Explained
One way to achieve higher investment returns in real estate is to use leverage or debt. It can allow one to
achieve significantly higher returns, and place most of the downside risk on lender. However, it makes the
investment return more sensitive to changes in the property’s financial performance.
Let’s consider a property that is purchased for $10.0 million and has NOI of $800k
(net operating income = revenue – expenses excl. debt). If the purchase is all cash,the annual return
(aka – cash on cash) is 8.0% ($800k / $10.0M = 8.0%). If the buyer gets a loan at 80% LTV (loan to value)
or $8.0M with a 7% interest rate ($560k). the property still throws off $800k in NOI but has a $560k debt
payment. This leaves $240k, however, she only invested $2.0M in cash because of the 80% loan. This equates
to a leveraged return of 12.0% for the buyer ($240k / $2.0M = 12.0%). We see that because the borrowing rate