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
#!/usr/bin/env node | |
let data = ''; | |
const args = process.argv.slice(2); | |
if (args.length) { | |
console.log(sum(args)); | |
process.exit(0); | |
} |
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
// vk retracking | |
(window.Image ? (new Image()) : document.createElement('img')).src = location.protocol + '//vk.com/rtrg?r=%VK_RETRACKING_ID%', | |
// fb pixel | |
(window.Image ? (new Image()) : document.createElement('img')).src= 'https://www.facebook.com/tr?id=%FB_PIXEL_ID%&ev=PageView'; |
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
(ns simple-life.core | |
"Simplified game of life. Random universe consists of ones and | |
zeros. For every iteration we calculate current cell value | |
depending on it's own value and values of it's left and right | |
neighbours. When exactly one of those cells is 1 the resulting | |
value for next generation is 1, otherwise it's 0. For edge | |
elements the absent neighbour counts as 0.") | |
(defn next-cell [coll] | |
"takes collection and returns 1 only if one of collection's |