Skip to content

Instantly share code, notes, and snippets.

View podviaznikov's full-sized avatar
🗽
NYC, hacking, thinking, observing, feeling

anton podviaznikov

🗽
NYC, hacking, thinking, observing, feeling
View GitHub Profile
@podviaznikov
podviaznikov / freebase-countries.json
Created January 29, 2015 23:16
freebase-countries.json
[ { capital: 'Вашингтон',
type: '/location/country',
id: '/en/united_states',
name: 'Сполучені Штати Америки' },
{ capital: 'Берлін',
type: '/location/country',
id: '/en/germany',
name: 'Німеччина' },
{ capital: 'Канберра',
type: '/location/country',
@podviaznikov
podviaznikov / sublime-tricks.md
Last active August 29, 2015 14:10
sublime tricks
  • Command + D - select a word.
  • Command + L - select a line.
  • Command + Ctrl + G - select a code, line, or word first the hit this combo to select the others with the same instances.
  • F5 - sort the properties in alphabetical order
  • Command - hold the Command key and click on the lines that you want to select.
  • Command + Shift + ] - bring you immediately to the next tab.
  • Command + Shift + [ - bring you the previous tab.
  • Command + Ctrl + P - switch between the projects that are listed on the SublimeText Sidebar.
  • Command + E - put the code selected in the Find input field.
  • Command + R - file crawling.
@podviaznikov
podviaznikov / terminal-shortcust.md
Created November 24, 2014 19:41
Terminal Shortcuts
  • Jump to Beginning of Line – Control+A
  • Jump to End of Line – Control+E
  • Go to Next Line – Control+N
  • Go to Previous Line – Control+P
  • Delete Previous Word – Control+W
  • Delete Line from Cursor to Beginning – Control+U
  • Delete Line from Cursor to End – Control+K
  • Cut from Cursor to Beginning of Line – Control+U
  • Cut from Cursor to End of Line – Control+K
  • Paste Previously Cut Text at Cursor – Control+Y

Keybase proof

I hereby claim:

  • I am podviaznikov on github.
  • I am podviaznikov (https://keybase.io/podviaznikov) on keybase.
  • I have a public key whose fingerprint is ED55 74C1 1394 8860 7EA1 C228 879F 60AE EC4D D532

To claim this, I am signing this object:

Verifying myself: My Bitcoin username is +podviaznikov. https://onename.io/podviaznikov
(defn pascaltriangle-iter [row col]
(if (or (= col 1) (= col row))
1
(+
(pascaltriangle-iter (- row 1) (- col 1))
(pascaltriangle-iter (- row 1) col))))
(defn pascaltriangle-row [row]
(for [i (range 1 (+ 1 row))]
(pascaltriangle-iter row i)))
Links:
* http://blog.zachorr.com/nginx-setup/
@podviaznikov
podviaznikov / fibonacci.clj
Created October 30, 2013 16:57
Fibonacci implementation on Clojure.
(defn fib-iter [a b n]
(if (zero? n)
b
(recur (+ a b) a (dec n))))
(defn fib [n]
(fib-iter 1 0 n))
(fib 40) ;102334155
@podviaznikov
podviaznikov / gdc.clj
Created October 30, 2013 15:57
The greatest common divisor (GCD) of two integers: x and y. http://people.cis.ksu.edu/~schmidt/301s12/Exercises/euclid_alg.html. Clojure implementation.
(defn gdc [x y]
(if (= x y)
x
(if (> x y)
(recur (- x y) y)
(recur (- y x) x))))
(gdc 10, 100) ; 10