Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am mavit on github.
  • I am mavit (https://keybase.io/mavit) on keybase.
  • I have a public key ASC0OUd9gvWh1pu0sViG2Qio5PzXgjOIslc-wVURnaWgZQo

To claim this, I am signing this object:

@mavit
mavit / README.md
Last active August 29, 2015 14:18 — forked from toddq/README.md
#!/usr/bin/perl
use v5.16;
use warnings;
use bigint;
use Lingua::EN::Numbers;
sub output {
my $i = shift;
say $i, "\t", Lingua::EN::Numbers::num2en($i);
0 zero
1 one
2 two
3 three
4 four
5 five
6 six
7 seven
8 eight
9 nine
@mavit
mavit / gist:7809777
Created December 5, 2013 17:35
Export Chromium bookmarks as CSV
#!/bin/sh
# This is a hack. In real life, never parse JSON with a regular expression. Never write SQL unencoded to a string.
perl -nE 'push @urls, $1 if m/^\s+"url":\s+"(.+?)"/; END { say q[select url, title, visit_count from urls where url in ("], join(q(","), @urls), q[") order by visit_count desc;] }' ~/.config/chromium/Default/Bookmarks | sqlite3 -csv ~/.config/chromium/Default/History
;; Workaround the annoying warnings:
;; Warning (mumamo-per-buffer-local-vars):
;; Already 'permanent-local t: buffer-file-name
(when (version<= "24.2" emacs-version)
(eval-after-load "mumamo"
'(setq mumamo-per-buffer-local-vars
(delq 'buffer-file-name mumamo-per-buffer-local-vars))))