#!/bin/bash
# NVM needs the ability to modify your current shell session's env vars,
# which is why it's a sourced function
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 fs = require('fs') | |
var path = require('path') | |
var cp = require('child_process') | |
if (!process.argv[2]) { | |
console.log('Specify directory to check') | |
process.exit() | |
} |
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 express = require('express') | |
var serveIndex = require('serve-index') | |
var serveStatic = require('serve-static') | |
var app = express() | |
app.use(serveStatic('/home/s')) | |
app.use('/', serveIndex('/home/s', {'icons': true, view: 'details'})) | |
app.listen(8001) |
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
// https://github.com/mziccard/node-timsort/#stability | |
var t = require('assert') | |
// sorted by weight | |
var input = [ | |
{ height: 100, weight: 80 }, | |
{ height: 90, weight: 90 }, | |
{ height: 70, weight: 95 }, |
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
// current | |
Prism.languages.javascript = Prism.languages.extend('clike', { | |
'keyword': /\b(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/, | |
'number': /\b(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/, | |
// Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) | |
'function': /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\()/i, | |
'operator': /-[-=]?|\+[+=]?|!=?=?|<<?=?|>>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/ | |
}); |
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 compose = require('request-compose') | |
// DevTools -> Application -> Cookies | |
var token = '...' | |
var parse = (regex, string, map = (a) => a, result = [], match = regex.exec(string)) => | |
!match ? result : parse(regex, string, map, result.concat(map(match))) |
I hereby claim:
- I am simov on github.
- I am simov (https://keybase.io/simov) on keybase.
- I have a public key ASCAt2DzuPIz8LZpM4wu7FxNx8F1Q_iBW8SJqqesxDLuOQo
To claim this, I am signing this object:
Markdown Viewer is an open source browser extension hosted on GitHub: https://github.com/simov/markdown-viewer/tree/firefox
Build the themes
and vendor
folders, and create the markdown-viewer.zip
package:
cd markdown-viewer/
sh build/package.sh firefox
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
body { | |
font-family: 'Monospace', monospace; | |
} | |
table th { border-bottom: 2px solid; } | |
table td { border-right: 1px solid; padding: 5px 10px; } | |
table tr td:last-of-type { border: none; } | |
@media (prefers-color-scheme: dark) { |
OlderNewer