// instead of writing
h('section#main', mainContents)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gris theme | |
evaluate-commands %sh{ | |
c0="rgb:000000" | |
c5="rgb:555555" | |
ca="rgb:aaaaaa" | |
cf="rgb:ffffff" | |
main="rgb:ff69b4" | |
echo " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# used by kakoune to use fzf+rg | |
# sleep needed to get real dimensions | |
sleep 0.1 | |
COLUMNS=$(tput cols) | |
LINES=$(tput lines) | |
# multiply by 2 to roughly approximate the size of a cell | |
LINES=$(expr $LINES \* 2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def registers %{ %sh{ | |
echo -n info -title registers -- %{ | |
echo '% ' "$kak_reg_percent" | |
echo '. ' "$kak_reg_dot" | |
echo '# ' "$kak_reg_hash" | |
echo '" ' "$kak_reg_dquote" | |
echo '@ ' "$kak_reg_arobase" | |
echo '/ ' "$kak_reg_slash" | |
echo '^ ' "$kak_reg_caret" | |
echo '| ' "$kak_reg_pipe" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tmux list-commands | cut -d' ' -f1 | sed -r 's/([^-]*)-(.*)/\2-\1/' | sort | |
before-confirm | |
buffer-choose | |
buffer-delete | |
buffer-load | |
buffer-paste | |
buffer-save | |
buffer-set |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _ = require('lodash') | |
_.templateSettings.imports.bang = x => `${x}!` | |
var compiled = _.template('<b><%= bang("foo") %></b>') | |
console.log(compiled()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// example taken from redux middleware docs : http://gaearon.github.io/redux/docs/advanced/Middleware.html | |
// ES5 | |
function logger (store) { | |
return function (next) { | |
return function (action) { | |
console.log('dispatching', action); | |
var result = next(action); | |
console.log('next state', store.getState()); | |
return result; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// dblclick on a code snippet to display it (almost) fullscreen | |
// dblclick again to hide it | |
(function () { | |
"use strict"; | |
function expand (node) { | |
node.addEventListener('dblclick', function () { | |
var clone = node.cloneNode(true); | |
clone.style.bottom = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ack '^## ' | |
no-control-regex.md | |
5:## Rule Details | |
24:## When Not To Use It | |
no-new.md | |
9:## Rule Details | |
no-labels.md |