Simplest way to add pan/zoom to a d3js visualisation
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
// MIT License | |
// | |
// Copyright (c) 2019 Simon Lightfoot | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |
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
license: mit |
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
import { Component, OnChanges, OnDestroy, SimpleChange, ElementRef, Input } from '@angular/core'; | |
import { D3Service } from 'd3-ng2-service'; | |
import { BaseChart } from '../base.chart'; | |
@Component({ | |
selector: 'app-piechart', | |
template: `<ng-content></ng-content>`, | |
styleUrls: ['./piechart.component.scss'], | |
}) |
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
git clone git://github.com/sstephenson/rbenv.git .rbenv | |
git clone git://github.com/sstephenson/ruby-build.git | |
echo 'export PATH="$HOME/.rbenv/bin:$HOME/ruby-build/bin:$PATH"' >> ~/.bash_profile | |
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
. .bash_profile | |
rbenv install 2.1.2 | |
rbenv global 2.1.2 |
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
// instantiate the addressPicker suggestion engine (based on bloodhound) | |
var addressPicker = new AddressPicker({map: {id: '#map'}}); | |
// instantiate the typeahead UI | |
$('#address').typeahead(null, { | |
displayKey: 'description', | |
source: addressPicker.ttAdapter() | |
}); | |
// Bind some event to update map on autocomplete selection |
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
require "redis" | |
worker_processes 8 | |
preload_app true | |
timeout 600 | |
listen '/tmp/vodeclic.sock', :backlog => 1024 | |
pid '/tmp/vodeclic.pid' | |
## | |
# REE |
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
DEBUG = 1 | |
module ::Guard | |
class Coffee < Guard | |
DEFAULT_OPTIONS = {compiler: 'coffee', input: 'coffee', output: 'js'} | |
def initialize(watchers = [], options = {}) | |
watchers = [] if !watchers | |
defaults = DEFAULT_OPTIONS.clone | |
if options[:input] |
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
<body> | |
<article> | |
<h1 class="fixie"></h1> | |
<p> Check us out at <a class="fixie"></a>, | |
and don't forget to view source.</p> | |
<section class="fixie"> | |
<p></p> | |
<img/> | |
<ul></ul> | |
<p></p> |
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
class MyView extends Backbone.View | |
constructor: -> | |
super | |
# Votre code .... |
NewerOlder