Skip to content

Instantly share code, notes, and snippets.

@krtx
krtx / imgcat
Created November 27, 2016 02:48
fix imgcat to be able to display images on tmux https://gitlab.com/gnachman/iterm2/issues/3898#note_14097715
#!/bin/bash
# tmux requires unrecognized OSC sequences to be wrapped with DCS tmux;
# <sequence> ST, and for all ESCs in <sequence> to be replaced with ESC ESC. It
# only accepts ESC backslash for ST.
function print_osc() {
if [[ -n $TERM ]] ; then
printf "\033Ptmux;\033\033]"
else
printf "\033]"
@grindfuk
grindfuk / interface.js
Created April 27, 2016 16:45
Node.js ES6 Class Interface
'use strict';
class NotImplementedException extends Error {
}
class InvalidInitialization extends Error {
}
function abc(cls, options) {
let iname = options ? options.interfaceName : 'Interface';
let metaData = {