This file contains hidden or 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
// Styling Chrome Console | |
function cons(styles) { | |
if (!cons.initial) cons.initial = console; | |
var defaultStyles = 'font-family: Arial; font-size: 2em;'; | |
styles = styles || defaultStyles; | |
console = { | |
log: function(str) { cons.initial.log('%c' + str, styles) } |
This file contains hidden or 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
const http = require('http'); | |
const Firebase = require('firebase'); | |
const FB_ROOT = new Firebase('https://scrapyard.firebaseio.com/'); | |
const VK = { | |
wallGet: { | |
// translating vk api to node http api | |
reqOpts: function(opts) { | |
return({ | |
host: 'api.vk.com', |
This file contains hidden or 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
function doubleNum(num) { | |
var | |
numStr = num + '', | |
numLen = numStr.length; | |
if (!(numLen%2)) { | |
var | |
first = numStr.substring(0, numLen/2), | |
second = numStr.substring(numLen/2); |
NewerOlder