Skip to content

Instantly share code, notes, and snippets.

View k1r0s's full-sized avatar

Ciro k1r0s

View GitHub Profile
@developit
developit / unistore.js
Last active September 8, 2020 15:13
Update: the newer & better version of this is published: https://github.com/developit/unistore
import { h, Component } from 'preact';
/** Creates a new store, which is a tiny evented state container.
* @example
* let store = createStore();
* store.subscribe( state => console.log(state) );
* store.setState({ a: 'b' }); // logs { a: 'b' }
* store.setState({ c: 'd' }); // logs { c: 'd' }
*/
@leommoore
leommoore / nano_js_syntax_highlighting.md
Last active October 5, 2023 21:21
nano javascript syntax highlighting

#nano javascript syntax highlighting

The existing syntax highlighting is located in /usr/share/nano/

To add a new language

sudo nano /usr/share/nano/javascript.nanorc

Put the following in the contents: