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
// This file is part of github.com/Trrnts/Trrnts - an upcoming alternative to The Pirate Bay. | |
var bencode = require('bencode'), | |
dgram = require('dgram'), | |
hat = require('hat'), | |
_ = require('lodash'), | |
redis = require('../redis')(), | |
geoip = require('geoip-lite'); | |
// Put in a function. The returned function won't ever throw an error. This is |
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
var request = require('request'), | |
_ = require('lodash'); | |
// 100: Audio | |
// 200: Video | |
// 300: Applications | |
// 400: Games | |
// 500: Porn | |
// 600: Other | |
var categories = [100, 200, 300, 400, 500, 600]; |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.chart { | |
height: 70px; | |
width: 300px; | |
border-bottom: 1px solid #ccc; | |
display: block; | |
margin: 1em; | |
} |
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
// Usage: | |
// var logger = require('./logger'); | |
// logger.debug('Debug message'); | |
// logger.info('Info message'); | |
// logger.warn('Warn message'); | |
// logger.error('Error message'); | |
// logger.addLevels({ | |
// silly: 'white' | |
// }); | |
// logger.silly('Silly message'); |
NewerOlder