Skip to content

Instantly share code, notes, and snippets.

View deciob's full-sized avatar

Decio Battaglia deciob

  • Featurespace
  • Cambridge, UK
View GitHub Profile
module Main exposing (main)
import Dict exposing (Dict)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Http
import Json.Decode as Decode
import Random
module Main exposing (main)
import Dict exposing (Dict)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Http
import Json.Decode as Decode
import Random
@deciob
deciob / .block
Last active April 23, 2019 18:55
Animated bar chart
license: gpl-3.0
# first check if there is no histogram around...
if @g.selectAll('path')[0].length == 0
@bar = @g.selectAll("g.bar")
.data(data)
.enter().append("g")
@bar.append("rect")
#
# ...more code...
#
else
@deciob
deciob / postgres
Created October 4, 2012 08:53
Usefull postgres commands
# change owner recursively ...
postgres=# REASSIGN OWNED BY deciob TO decioc;
@deciob
deciob / ol_geonames.js
Created September 7, 2012 16:00
ol geonames search
var setup_find_places = function() {
var search_container = $j("#searchResultsContainer");
var place_input = $j("#placeName");
var placeholder_place = place_input.val();
place_input.focus(function() {
if (place_input.val() == placeholder_place) {
place_input.val("");
}
});
$j("#search-form").submit(function(e) {
@deciob
deciob / chaplin-links-4.coffee
Created August 5, 2012 13:51
chaplin-links-4
@deciob
deciob / chaplin-links-3.js
Created August 5, 2012 11:35
chaplin-links-3
@deciob
deciob / chaplin-links-2.js
Created August 5, 2012 11:31
chaplin-links-2
@deciob
deciob / chaplin-links-1.html
Created August 5, 2012 11:24
chaplin-links-1