Skip to content

Instantly share code, notes, and snippets.

View skuro's full-sized avatar

Carlo Sciolla skuro

View GitHub Profile

Keybase proof

I hereby claim:

  • I am skuro on github.
  • I am skuro (https://keybase.io/skuro) on keybase.
  • I have a public key whose fingerprint is FD97 B0FD 9DB1 112B 72CC 7288 F4B7 CED9 5A50 F60B

To claim this, I am signing this object:

@skuro
skuro / berlin-clock.cljs
Last active July 22, 2016 12:11
Berlin Clock kata as implemented at the Amsterdam Clojurians cljs dojo, meetup #80
# Amsterdam Clojurians meetup #80
# A ClojureScript dojo: the Berlin Clock!
#
# Fork this gist and put your solution in
(ns berlin-clock.clock
(:require [reagent.core :as reagent :refer [atom]]))
(def now (atom (js/Date.)))
package tk.skuro.scala
object Raffle extends App {
case class Attendee (name: String)
type Attendees = Array[Attendee]
case class RaffleState(participants: Attendees = new Array(0))
val initialState = new RaffleState(new Array(0))
package io.sytac;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@skuro
skuro / README.md
Last active March 31, 2016 06:51
Lotsa advocaat

Amsterdam Clojurians dojo n. 76

Fork this gist and provide your solution. Input is:

50
44
11
49
42
@skuro
skuro / conway.clj
Created January 13, 2016 19:53
#amsclj 73
(ns life.core
(:require [clojure.pprint :as pp]))
(def grid [[:alive :dead :alive]
[:dead :dead :dead]
[:alive :alive :alive]])
(defn cell
"Returns the value of the cell at the given coordinates"
[grid [x y]]
@skuro
skuro / clojure-dojo.md
Last active November 23, 2020 05:36
Crime at Piccadilly Circus

Results of the Clojure Dojo

This gist is just a placeholder for your solution of the Clojure Dojo from the Amsterdam Clojurians meetup.

To share your solution:

  • fork this gist
  • add the files containing your code to the forked gist

Thanks!

@skuro
skuro / gist:3286e7a53d4938437ed1
Created April 8, 2015 19:34
Amsterdam Clojurians: Dojo #4
Please clone this gist to provide your solution!
@skuro
skuro / protocols.clj
Created February 5, 2015 08:58
Just a sample use of Clojure protocols
(ns protocols)
(defprotocol Flying
(fly [this from to]))
(extend-type String ; <- protocols are "open", as they install a dispatch facility rather than fussing with type inheritance
Flying
(foo [this from to] (println "Even a String can fly from" from "to" to)))
@skuro
skuro / AppConfig.groovy
Last active August 29, 2015 14:14
Environment micro benchmark
@PropertySource(["classpath:application.properties"])
@Configuration
@ComponentScan("org.sample")
public class AppConfig {
@Autowired
private Environment environment
}