Skip to content

Instantly share code, notes, and snippets.

@fafnirical
fafnirical / README.md
Last active March 6, 2018 01:22 — forked from MaciejKus/README.md
d3 map with states and countries

A d3 world map which shows the states of Canada and the USA on zoom. Also has rotation, but only when scale is set to 1 (zoomed out).

I combined a world topo.json file with a states topo.json file using something like this:

node_modules/.bin/topojson --allow-empty -p name -o combined2.json -- data/countries.topo.json data/states_usa.topo.json
@fafnirical
fafnirical / index.html
Last active December 27, 2017 18:08
N-ile chart
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
width: 375px;
height: 165px;
}
</style>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script>
langcode: en
status: true
dependencies:
config:
- field.field.media.image.field_image
- image.style.thumbnail
- media_entity.bundle.image
module:
- image
id: media.image.default
@fafnirical
fafnirical / change-photo.md
Created February 4, 2016 06:37
Change photo for all meetup groups
  1. Go to your main profile: [http://www.meetup.com/profile/]
  2. Get the ID of the photo you want to use by:
  3. Click on "Photos"
  4. Navigate to the photo you want to use
  5. Right-click on the "Set as main profile photo" link and select "Copy" -- it should be something like [http://www.meetup.com/account/photo/?op=swap&id=photoID]
  6. The **photoID** (id=**photoID**) in the URL is your photo ID.
  7. Close the "Photos" dialog. You should be at [http://www.meetup.com/profile/].
  8. If you haven't already, click on the "See All My Meetup Groups" button.
  9. Open your browser's developer tools (usually F12), and run the following in the Console tab, replacing **photoID** with the photo ID you want to change to:
@fafnirical
fafnirical / justify-nav-links.css
Last active December 3, 2015 02:51 — forked from northk/justify-nav-links.css
Using text-align:justify and :after to display equally spaced, justified variable-width navigation links