Skip to content

Instantly share code, notes, and snippets.

View noahpryor's full-sized avatar

Noah Pryor noahpryor

View GitHub Profile
@noahpryor
noahpryor / gist:5952687
Last active December 19, 2015 12:09
useful .methods
class Object
# print public methods which are not inherited from Object
def pm
(self.public_methods - Object.public_methods).sort
end
end
@noahpryor
noahpryor / funds.json
Last active December 24, 2015 15:19
fund json example
{"icn_response_header":{"status_code":200,"status_type":"Successful","status_message":"OK","message":null,"additional_info":null},"fund_search":{"id":1,"name":"noo","asset_class_ids":[],"icn_strategy_ids":[],"icn_geo_region_ids":[],"target_size_max":null,"target_size_min":null,"aum_max":null,"aum_min":null,"target_irr_max":null,"target_irr_min":null,"historical_quartile_max":null,"historical_quartile_min":null,"historical_irr_max":null,"historical_irr_min":null,"historical_moic_max":null,"historical_moic_min":null,"first_time_funds":null,"funds_with_video":null},"funds":[{"id":1,"name":"Infracapital Partners II","asset_class_id":1,"target_usd":1338.89,"strategy_ids":[45],"weighted_irr":0.0,"weighted_moic":0.9817,"weighted_quartile":0.9817,"raised_last_10_usd":1616.6},{"id":2,"name":"India Infrastructure Fund II","asset_class_id":1,"target_usd":1000.0,"strategy_ids":[45],"weighted_irr":null,"weighted_moic":null,"weighted_quartile":null,"raised_last_10_usd":2257.0},{"id":3,"name":"Cordiant Emerging Loan Fund (C
<!DOCTYPE html>
<html lang="en">
<head>
<title>dc.js - Dimensional Charting Javascript Library</title>
<meta charset="UTF-8">
<link rel="https://raw.github.com/NickQiZhu/dc.js/master/web/css/dc.css" style="text/stylesheet">
<link rel="https://raw.github.com/NickQiZhu/dc.js/master/web/css/bootstrap.css" rel="stylesheet" type="text/css" />
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="angularjs dc crossfilter" />
<title>JS Bin</title>
</head>
<body>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<title>dc.js Experiment</title>
<script src='js/d3.v3.js' type='text/javascript'></script>
<script src='js/crossfilter.js' type='text/javascript'></script>
<script src='js/dc2.js' type='text/javascript'></script>
/*!
* Bootstrap v2.3.2
*
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
*/.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;ver
/*!
* Bootstrap v2.3.2
*
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
*/.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;ver
@noahpryor
noahpryor / README.md
Created November 25, 2013 03:38 — forked from mbostock/.block

A fork of the original, but with regularly-spaced color breaks demonstrating lack of contrast.

javascript:(function()%7Bvar s%3Ddocument.createElement(%27div%27)%3Bs.innerHTML%3D%27Loading...%27%3Bs.style.color%3D%27black%27%3Bs.style.padding%3D%2720px%27%3Bs.style.position%3D%27fixed%27%3Bs.style.zIndex%3D%279999%27%3Bs.style.fontSize%3D%273.0em%27%3Bs.style.border%3D%272px solid black%27%3Bs.style.right%3D%2740px%27%3Bs.style.top%3D%2740px%27%3Bs.setAttribute(%27class%27,%27selector_gadget_loading%27)%3Bs.style.background%3D%27white%27%3Bdocument.body.appendChild(s)%3Bs%3Ddocument.createElement(%27script%27)%3Bs.setAttribute(%27type%27,%27text/javascript%27)%3Bs.setAttribute(%27src%27,%27https://schlepless.herokuapp.com//selectorgadget.js%3Fraw%3Dtrue%27)%3Bdocument.body.appendChild(s)%3B%7D)()%3B
@noahpryor
noahpryor / gist:9968643
Created April 4, 2014 05:24
pagination
def pagination_url
end
def pages(pages=10,start=1)
end_page=start+pages
(start..pages).map {|page| url+"/pages/#{page}" }
end