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 / balloon.css
Created June 8, 2010 09:38
Demo page of CSS3 transform/transition with some JS
#ballon {
-webkit-transition: all .2s ease-in-out;
}
module PDoc
module Generators
module Html
CODE_BLOCK_REGEXP = /(?:\n\n|\A)(?:\s{4,}lang(?:uage)?:\s*(\w+)\s*\n)?((?:\s{4}.*\n*)+)(^\s{0,3}\S|\z)?/
attr_reader :default_language, :highlighter
class SyntaxHighlighter
def initialize(options = {})
@default_language = options[:default_language] ||= :javascript
@highlighter = options[:highlighter] ||= :none
@sgruhier
sgruhier / update_google_chrome.sh
Created June 3, 2009 20:07 — forked from joefiorini/update_google_chrome.sh
Update chromium on Mac OS X
#!/bin/bash
set -e
BUILD_URL='http://build.chromium.org/buildbot/snapshots/sub-rel-mac/'
update_google_chrome() {
get_latest_revision_number
download_latest_revision
extract_code
Some brief instructions on how to use Sprocket 2 in Rails to get CoffeeScript
powered JS and SASS powered CSS with YUI compression all via the magic of rack.
This stuff will be native in Rails 3.1 and the layout of the files on the
filesystem will be different but this guide will get you working with it
while we wait for all that to finalize.
Ignore the number prefixes on each file. This is just to ensure proper order in the Gist.
It's based on eric1234 gist https://gist.github.com/911003. ijust made it 3.1 compliant in terms of convention
@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

<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 ....
var marker = addresspickerMap.addresspicker( "marker");
var map = addresspickerMap.addresspicker( "map");
google.maps.event.addListener(marker, 'click', function() {
var infowindow = new google.maps.InfoWindow({content: "bla bla bla"})
infowindow.open(map,marker);
});
});
Acceptance test with devise signup with stub for omniauth