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
;; project.clj | |
;(defproject github-stat "0.0.1-SNAPSHOT" | |
; :dependencies [[clojure "1.2.0"] | |
; [clojure-contrib "1.2.0"] | |
; [clj-http "0.1.3"] | |
; [incanter "1.2.3"]]) | |
(ns github.fun | |
(:use clojure.contrib.json clojure.contrib.pprint | |
[incanter core stats charts]) |
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
(ns blades | |
(:use [incanter core stats charts]) | |
(:import java.text.SimpleDateFormat)) | |
(def dates | |
{"first one-bladed gilette safety razor, 1" 1888 | |
"Trac II" 1971 | |
"Mach3" 1998 | |
"Wilkinson Quattro" 2003 | |
"Fusion" 2006 |
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
;; using clojures included batteries | |
(reduce | |
(partial | |
merge-with (fn [x y] (if (seq? x) (conj x y) [x y]))) | |
[{:en "en1" :de "de"} {:en "en2" :de "de2"}]) | |
;; even easier if we already have vectors as values | |
(reduce | |
(partial merge-with concat) | |
[{:en ["en1"] :de ["de"]} {:en ["en2"] :de ["de2"]}]) |
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
(function() { | |
toggleQuickFilter = GH.Components.QuickFilters.prototype.toggleQuickFilter; | |
GH.Components.QuickFilters.prototype.toggleQuickFilter = function(event, button) { | |
var title = $(button).attr('title'); | |
if (!$(button).hasClass('ghx-active') && title !== undefined && title.match(/RADIOBUTTON/)) { | |
GH.Components.QuickFilters.prototype.clearFilters(); | |
} | |
toggleQuickFilter.apply(this, Array.prototype.slice.call(arguments)); | |
}; | |
}()); |