Skip to content

Instantly share code, notes, and snippets.

View attilapiros's full-sized avatar

Attila Zsolt Piros attilapiros

View GitHub Profile
@attilapiros
attilapiros / gist:8181913
Last active January 1, 2016 18:09 — forked from attilapiros/gist:8181870
JQuery based bookmarklet solution to collect youtube links (not working when CSP denies acces to ajax.googleapis.com).
(function(){
// the minimum version of jQuery we want
var v = "1.3.2";
// check prior inclusion and version
if (window.jQuery === undefined || window.jQuery.fn.jquery < v) {
var done = false;
var script = document.createElement("script");
script.src = "https://ajax.googleapis.com/ajax/libs/jquery/" + v + "/jquery.min.js";
(ns roman-nums.core
(:require
[clojure.test :refer [testing are]]))
(def ^:private roman-digits
[[1000 "M"] [900 "CM"]
[500 "D"] [400 "CD"]
[100 "C"] [90 "XC"]
[50 "L"] [40 "XL"]
[10 "X"] [9 "IX"]
@attilapiros
attilapiros / clean_code.md
Created June 2, 2017 08:59 — forked from wojteklu/clean_code.md
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