A modified version of Mike Bostock’s mesmerising stereographic projection example.
A NASA Blue Marble raster image is reprojected using d3.geo.stereographic().invert from the geo.projection D3 plugin.
A modified version of Mike Bostock’s mesmerising stereographic projection example.
A NASA Blue Marble raster image is reprojected using d3.geo.stereographic().invert from the geo.projection D3 plugin.
| // HELPER: #key_value | |
| // | |
| // Usage: {{#key_value obj}} Key: {{key}} // Value: {{value}} {{/key_value}} | |
| // | |
| // Iterate over an object, setting 'key' and 'value' for each property in | |
| // the object. | |
| Handlebars.registerHelper("key_value", function(obj, fn) { | |
| var buffer = "", | |
| key; |
| <snippet> | |
| <content><![CDATA[{% include '__localize' with 'l10n-${SELECTION/([a-zA-Z]+)(?:(\s+?)|\b)/?1:\L$1(?2:-)\E/g}' %}]]></content> | |
| <description>Wrap String in localization helper</description> | |
| </snippet> |
| When logged in, go to "Settings > Checkout > Checkout Language", click the "View and customize this translation" link. | |
| A page with a url like this opens: "https://yourshop.myshopify.com/admin/settings/locales/[locale_id]". | |
| copy [locale_id]. | |
| Go Back and choose "create a new one". | |
| Open the Javascript console, paste this (change to your shop/locale_id first): |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| <html> | |
| <head> | |
| <title> | |
| Demo Cross Domain | |
| </title> | |
| <!-- Le styles --> | |
| <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet"> | |
| <style> | |
| body { |
| #!/usr/bin/env ruby | |
| # Usage: gitio URL [CODE] | |
| # | |
| # Turns a github.com URL | |
| # into a git.io URL | |
| # | |
| # Copies the git.io URL to your clipboard. | |
| url = ARGV[0] | |
| code = ARGV[1] |
| <?php | |
| add_image_size('thumbnail-bw', 400, 0, false); | |
| add_filter('wp_generate_attachment_metadata','bw_images_filter'); | |
| function bw_images_filter($meta) { | |
| $file = wp_upload_dir(); | |
| $file = trailingslashit($file['path']).$meta['sizes']['thumbnail-bw']['file']; | |
| list($orig_w, $orig_h, $orig_type) = @getimagesize($file); | |
| $image = wp_load_image($file); | |
| imagefilter($image, IMG_FILTER_GRAYSCALE); |
| $(document).ready(function() { | |
| var imgArr = new Array ( | |
| <?php | |
| $total = count(get_field('field')); | |
| $count = 1; | |
| while(the_repeater_field('field', $pagenumber)): ?> | |
| '<?php the_sub_field('sub_field'); ?>'<?php if($count < $total){echo ',';} $count++; ?> | |
| <?php endwhile; ?> | |
| ); | |
| var n = 0; |
| class Shape | |
| attr_reader :color | |
| def initialize(color) | |
| @color = color | |
| end | |
| def can_fit?(shape) | |
| self.area < shape.area ? true : false | |
| end |