Skip to content

Instantly share code, notes, and snippets.

@runexec
runexec / Clojure Does Objects Better.clj.md
Last active June 17, 2020 03:47
Clojure Does Objects Better

Clojure does Objects Better

A hopefully short and concise explanation as to how Clojure deals with Objects. If you already write Clojure, this isn't for you.

You know what an Interface is if you write/read Java or PHP 5+. In Clojure it might be called defprotocol.

user> (defprotocol IABC
        (also-oo [this])
        (another-fn [this x]))

IABC

@hotienvu
hotienvu / ngSize
Last active December 14, 2015 15:08
My custom directive to 2 way-bind the size attribute of <select>. The issue is open here https://github.com/angular/angular.js/issues/1619
myApp.directive('ngSize', function() {
return {
restrict:'A',
scope: {
ngSize: '='
},
link: function(scope, elem, attrs) {
scope.$watch("ngSize", function(newVal, oldVal) {
angular.element(elem).attr('size', newVal);
});
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 3, 2024 19:09
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname