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
var winston = require('winston') | |
// set default log level. | |
var logLevel = 'info' | |
// Set up logger | |
var customColors = { | |
trace: 'white', | |
debug: 'green', | |
info: 'blue', |
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
Number.prototype.toPhrase = function (fem, one, two, three, four, five) | |
// Число прописью от 0 до 999 триллионов | |
// 100.toPhrase(false, 'чайник', 'чайника', 'чайника', 'чайника', 'чайников') | |
{ | |
var x = Math.round((this + Number.EPSILON) * 100) / 100; | |
if (x < 0 || x > 999999999999999.99) return false; | |
if (fem === undefined) fem = true; | |
if (!one) one = 'единица'; | |
if (!two) two = 'единицы'; |
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
#!/bin/bash | |
# | |
# An example init script for running a Node.js process as a service | |
# using Forever as the process monitor. For more configuration options | |
# associated with Forever, see: https://github.com/nodejitsu/forever | |
# | |
# You will need to set the environment variables noted below to conform to | |
# your use case, and change the init info comment block. | |
# | |
# This was written for Debian distributions such as Ubuntu, but should still |
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
<?php | |
/** | |
* imap-attachment.php | |
* | |
* @author hakre <hakre.wordpress.com> | |
* @link http://stackoverflow.com/questions/9974334/how-to-download-mails-attachment-to-a-specific-folder-using-imap-and-php | |
*/ | |
/** | |
* Utility Class |