Skip to content

Instantly share code, notes, and snippets.

'n' ('next-node')
'p' ('prev-node')
'u' ('up-node')
'i' (index-search): Look up a string in the index for this file.
'C-s' (isearch-forward): Search interactively for a string as you type it.

Preamble

These are pieces of valid js.

''[''] = ''['']

{}[{}] = {}[{}]
@shofel
shofel / gist:cbf5fd6764ad7bac68c35db800095540
Last active February 25, 2019 19:00
Documentation things
# ReSTructured text
Sphinx, readthedocs
The concept of domains (js, c, cpp, html)
# ASCIIdoc
https://juxt.pro/yada/manual/index.html
@shofel
shofel / shofel-clojure-radar.md
Last active February 28, 2019 10:23
Clojure Radar
@shofel
shofel / shofel-emacs-radar.md
Last active February 28, 2019 09:22
Emacs Radar
@shofel
shofel / PrintTimePlugin.js
Created April 2, 2018 13:51
Webpack: print date when compilation starts and finishes.
/**
* Print time when watching.
*/
class PrintTimePlugin {
apply (compiler) {
compiler.hooks.done.tap(
'PrintTimePlugin',
_ => console.log('done', ShortDate(), '\n'))
@shofel
shofel / MessageInput.cycle.js
Created September 12, 2017 09:14
A cycle component for message input.
/**
* We use this component as an inputarea where user writes his message and then
* sends it by pressing the 'Return' button or clicking the 'Send' button.
*
* It appeared, that cleaning a textarea is not so trivial task o_O.
*
* Component has two streams as an input:
* - DOM:
* - To listen 'return' keypresses on the textarea.
* - To listen changes in the textarea value.
@shofel
shofel / mm2px.pl
Last active August 29, 2015 14:06
#!/usr/bin/perl
# convert millimeters to pixels
use feature 'say';
# take params
my (@mm,$dpi,$px);
($dpi, @mm) = @ARGV;
die "usage: $0 dpi mm[ mm]\n" unless ($mm[0]*$dpi);