Skip to content

Instantly share code, notes, and snippets.

View sgruhier's full-sized avatar

Sébastien Gruhier sgruhier

  • https://xilinus.com
  • Saint-Paul en Forêt
  • X @sgruhier
View GitHub Profile
@sgruhier
sgruhier / page_turn.dart
Last active July 5, 2022 13:20 — forked from slightfoot/page_turn.dart
Page Turn Effect - By Simon Lightfoot. Replicating this behaviour. https://www.youtube.com/watch?v=JqvtZwIJMLo
// 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:
@sgruhier
sgruhier / .block
Created April 23, 2017 09:58
zoom/pan d3v4
license: mit
@sgruhier
sgruhier / pie.ts
Created September 30, 2016 07:52
ng2
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'],
})

Simplest way to add pan/zoom to a d3js visualisation

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
// 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
require "redis"
worker_processes 8
preload_app true
timeout 600
listen '/tmp/vodeclic.sock', :backlog => 1024
pid '/tmp/vodeclic.pid'
##
# REE
@sgruhier
sgruhier / Guardfile
Created September 8, 2012 14:45
Quick (and dirty) Guardfile for CoffeeScriptRedux and SourceMap
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]
<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>
class MyView extends Backbone.View
constructor: ->
super
# Votre code ....