Skip to content

Instantly share code, notes, and snippets.

@thecristen
thecristen / index.html
Last active June 3, 2018 02:44 — forked from awoodruff/MarkerCluster.css
Leaflet heatmap
<html>
<head>
<title>A Leaflet map!</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.0.3/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>
@thecristen
thecristen / README.md
Created March 13, 2016 21:01 — forked from awoodruff/README.md
Dot density map

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.

@thecristen
thecristen / chosen-bootstrap.scss
Last active March 24, 2018 15:16 — forked from koenpunt/chosen-bootstrap.css
Bootstrap 3.0 theme for Chosen
// 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;
@thecristen
thecristen / fixtures.rake
Last active August 29, 2015 14:27 — forked from ZachBeta/fixtures.rake
Rake task to create fixtures from test database in Rails 3.1
#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|
@thecristen
thecristen / README.md
Last active August 29, 2015 14:05 — forked from bycoffe/README.md

This is forked from bycoffe!!! Please see there for more instruction.

I am going to modify this to show cool (but made up) data.