Use it with KindleGen
kindlegen dic.opf
/** | |
* Four column layout | |
*/ | |
body { padding: 0; margin: 0; } | |
div { | |
background: linear-gradient(#ea0, #c60); | |
color: white; | |
font: 7em Helvetica; |
# works only on Mac OS X with Evernote desktop client installed | |
# download the ohlife plaintext export and pipe it to this script | |
# eg. $ cat ~/Downloads/ohlife_2012blablabla.txt | python ohlife_to_evernote.py | |
# don't forget to change the notebook title if it's not "Journal" | |
from pipes import quote | |
import sys | |
import os | |
buf = '' |
document.oncopy = function() { | |
var sel = window.getSelection(); | |
var $div = $('<div style="position:absolute;left:-99999px">').html((sel+"").replace('', 'руб.')).appendTo('body'); | |
sel.selectAllChildren($div[0]); | |
setTimeout($div.detach, 0); | |
} |
Use it with KindleGen
kindlegen dic.opf
/** | |
* Interface shadows | |
* like http://ilyabirman.ru/meanwhile/2012/01/06/1/ | |
*/ | |
.btn { | |
display: inline-block; | |
border: #C0C0C0 solid 1px; | |
border-radius: 6px; | |
padding: 10px 15px; |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Grigory V. [email protected]
Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
; http://www.algolist.com/Dijkstra's_algorithm | |
(defn dijkstra [g src] | |
(loop [dsts (assoc (zipmap (keys g) (repeat nil)) src 0) | |
curr src | |
unvi (apply hash-set (keys g))] | |
(if (empty? unvi) | |
dsts | |
(let [unvi (disj unvi curr) | |
nextn (first (sort-by #(% dsts) unvi)) |
(use 'calx) | |
(def benchn 40) | |
(def ocl-src "int fib(int a) { | |
int b = -1; | |
int c = 1; | |
int d; | |
int i; | |
for (i=0;i<=a;i++) { | |
d = c + b; |
" File: commonjs-package-json | |
" Author: Ash Berlin <[email protected]>, Grigory V. <[email protected]> | |
" Last Change: 8-May-2011. | |
" Version: 2.0 | |
" Usage: | |
" | |
" Use by placing something like the following in your .vimrc: | |
" | |
" let g:maintainer='{ "name": "Ash Berlin", "web": "http://ashberlin.com" }' | |
" |
Yandex.Anthroponym is a web service which translates names from English to Russian and vice versa. This is a little script (designed for TextExpander, but works fine in a shell) which gets the current Mac OS X clipboard content, translates it and prints back the output.
So you have copied "Ray William Johnson", for example. Type the abbreviation you've defined in TextExpander and "Рей Вильям Джонсон" will be pasted.
If you don't have PyPy (you should, it's really fast), change the first line to "#!/usr/bin/env python". Don't forget to pip install requests. And, of course, to set snippet type to "Shell Script" when adding to TextExpander.