Skip to content

Instantly share code, notes, and snippets.

View nicokosi's full-sized avatar

Nicolas Kosinski nicokosi

View GitHub Profile
@wojteklu
wojteklu / clean_code.md
Last active October 24, 2025 01:15
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@edwthomas
edwthomas / charts-reframe.cljs
Created June 8, 2016 00:13
Example of using Chart.js with Clojurescript
(:require [re-frame.core :as re-frame]
[reagent.core :as reagent]
[cljsjs.chartjs])
(defn show-revenue-chart
[]
(let [context (.getContext (.getElementById js/document "rev-chartjs") "2d")
chart-data {:type "bar"
:data {:labels ["2012" "2013" "2014" "2015" "2016"]
:datasets [{:data [5 10 15 20 25]
@tzachz
tzachz / CounterBackedAccumulatorUtil.scala
Created November 4, 2015 21:06
Creating a Metrics Counter backed by a Spark Accumulator
package com.kenshoo.kripke.core
import com.yammer.metrics.Metrics
import com.yammer.metrics.core.{MetricName, Counter}
import org.apache.spark.Accumulator
import org.apache.spark.rdd.RDD
import scala.reflect.ClassTag
object CounterBackedAccumulatorUtil {
@philandstuff
philandstuff / codemesh2015.org
Last active November 16, 2015 19:37
Code mesh 2015 notes

Kush, an introduction to schedulers

about me

  • I work for GDS
  • Cabinet Office
  • we started by building GOV.UK
    • replaced older sites like direct gov, business link
  • we’re not just fixing websites
    • we also build and run digital services
    • working with depts across the country
    • eg: register to vote
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active October 23, 2025 17:44
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@globulon
globulon / Euler52-Clojure
Created January 31, 2012 17:05
Port in Clojure of missingfactor smart resolution of euler problem 52
(defn problem-fifty-two[]
(time (take 1 (drop-while #(not (= 1 (count (set (map (comp sort str (partial * %)) [2 3 4 5 6]))))) (iterate inc 1)))))