This is forked from bycoffe!!! Please see there for more instruction.
I am going to modify this to show cool (but made up) data.
This is forked from bycoffe!!! Please see there for more instruction.
I am going to modify this to show cool (but made up) data.
#put in lib/tasks/fixtures.rake | |
namespace :db do | |
namespace :fixtures do | |
desc 'Create YAML test fixtures from data in an existing database. | |
Defaults to development database. Set RAILS_ENV to override.' | |
task :dump => :environment do | |
sql = "SELECT * FROM %s" | |
skip_tables = ["schema_migrations"] | |
ActiveRecord::Base.establish_connection(:development) | |
(ActiveRecord::Base.connection.tables - skip_tables).each do |table_name| |
require 'json' | |
require 'net/http' | |
def getPrettyJSON(url) | |
uri = URI.parse(url) | |
http = Net::HTTP.new(uri.host, uri.port) | |
request = Net::HTTP::Get.new(uri.request_uri) | |
response = http.request(request) | |
p = JSON.parse(response.body) | |
return JSON.pretty_generate(p) |
// Customized styles for select boxes using the Chosen jQuery plugin | |
// forked from Bootstrap-themed version at https://gist.github.com/koenpunt/6424137 | |
// This one uses your variables from bootstrap-sass | |
// by thecristen, at https://gist.github.com/thecristen/e71ed5391fbdc6d63dc3 (no license go nuts) | |
// TODO: This only covers single select | |
select.form-control + .chosen-container.chosen-container-single .chosen-single { | |
@include box-shadow(inset 0 1px 1px rgba(0, 0, 0, .075)); | |
@include transition(border-color ease-in-out .15s, box-shadow ease-in-out .15s); | |
display: block; |
http://www-03.ibm.com/able/guidelines/web/accessweb.html
This is an attempt at a slightly D3-ish way of drawing a dot density map on a canvas element. In short, each polygon is drawn (invisibly) with a unique color, then random points are thrown at polygon bounding boxes and the pixel color is used for a point-in-polygon test. This example draws one dot for every 2 people in central Boston census blocks, for a total of approximately 132,000 dots.
A Pen by Cristen Jones on CodePen.
<html> | |
<head> | |
<title>A Leaflet map!</title> | |
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" /> | |
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script> | |
<script src="leaflet.heat.js"></script> | |
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> | |
<style> | |
#map{ height: 100% } | |
</style> |