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
{ | |
"swagger": "2.0", | |
"info": { | |
"version": "0.0.1", | |
"title": "MAYDAY" | |
}, | |
"paths": { | |
"/stats": { | |
"get": { | |
"description": "returns list of global stats\n", |
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
[{ | |
"map_key": "SD-JUNIOR", | |
"coordinates": [12, 12], | |
"legislator": { | |
"name": "Mike Rounds", | |
"title": "Senator", | |
"party": "R", | |
"support_max": "cosponsored", | |
"targeted": false, | |
"image_url": "https://s3.amazonaws.com/audio.mayday.us/congress-photos/99x120/R000605.jpg", |
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
{ | |
"reforms": [{ | |
"active": true, | |
"slug": "government-by-the-people-act", | |
"title": "Government By the People Act", | |
"reformType": "legislative", | |
"url": "http://ofby.us", | |
"parties": ["D"], | |
"id": 0, | |
"descriptionShort": "The Government by the People Act is a proposed bill to reform the campaign finance system, introduced into the House by 2014 by John Sarbanes (D-MD). A companion bill, the Fair Elections Now Act, was also introduced into the Senate.\n\nUnder the proposed bill, political contributions of up to $150 would be matched by a factor of six times more than the original donation as long as candidates meet certain requirements. They must not use their own money, not accept donations over $1000, have already received at least $50,000 from 1000 in-state donors, and decline most political action committee money.\n", |
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
# | |
# Paperclip convert id => id_partition | |
# | |
require 'ftools' #FileUtils | |
class PaperclipExtend | |
def self.obtain_class | |
class_name = ENV['CLASS'] || ENV['class'] | |
uploads_path = ENV['UPLOADS_PATH'] || ENV['uploads_path'] | |
raise "Must specify CLASS" unless class_name |
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
module Activo | |
module Rails | |
module Helper | |
# Displays a breadcrumb trail | |
# | |
# options - A hash of attributes to apply to the wrapping div tag | |
# | |
# Example: | |
# <div class="block"> |
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
#http://rcoder.net/content/testing-string-similarity-using-ruby-and-zlib | |
#see also: http://www.postgresql.org/docs/8.3/static/fuzzystrmatch.html | |
#see also: http://flori.github.com/amatch/ | |
require 'zlib' | |
# this is optimized to store a relatively smaller subset of common index | |
# terms against which new strings should be tested | |
class ZlibDistanceCalc | |
def initialize |
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
#/usr/local/elasticsearch/elasticsearch-0.17.7/logger.yml/elasticsearch.yml | |
# The cluster name | |
cluster.name: traceful_elasticsearch | |
cloud: | |
aws: | |
access_key: AKIAIPILOGJA7ORIBDNQ | |
secret_key: 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 |
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
<% count = 1 %> | |
<% if @invoice.lines.subscriptions.any? %> | |
<% @invoice.lines.subscriptions.each do |subscription| -%> | |
<tr class="<%= count % 2 == 0 ? 'even' : 'odd' %>"> | |
<td class="first"><%= format_unix_time(subscription.period.end) %></td> | |
<td><%= subscription.plan.name %> subscription from <%= format_unix_time(subscription.period.start) %> to <%= format_unix_time(subscription.period.end) %></td> | |
<td><%= number_to_currency(subscription.amount/100) %></td> | |
</tr> | |
<% count += 1 %> | |
<% 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
<style> | |
.contentWrap{float:left;width:630px;} | |
.formRow{float:right;position:releative;} | |
.wrapper.site_wrapper .salsa FORM .supporterInfo{float:right;margin:0;padding:0 0 0 30px;position:relative;height:auto;top:-40px !important} | |
.wrapper.site_wrapper .salsa FORM .supporterInfo SELECT{padding:8px;width:203px;} | |
.formRow INPUT.blockInput{padding:8px;} | |
.wrapper.site_wrapper .salsa FORM{position:relative;overflow:hidden;} |
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
<form action="http://anotherdomain/save" method="post" target="myiframe" id="myform"> | |
<!-- standard form here --> | |
</form> | |
<iframe src="about:blank" name="myiframe" style="display: none;"></iframe> | |
<!-- Then, javascript something like: --> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> | |
<script> |
OlderNewer