code
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
<style type="text/css"> | |
body{ | |
font-weight: 100; | |
} | |
div.displayContainer{ | |
background: #eee; | |
padding: 10px; | |
box-shadow: inset 0 0 3px -2px #000, inset 0 6px 6px -6px #000; | |
} | |
div.displayContainer h2{ |
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
.d8888. d88888b d888888b | |
88' YP 88' `~~88~~' | |
`8bo. 88ooooo 88 | |
`Y8b. 88~~~~~ 88 | |
db 8D 88. 88 | |
`8888Y' Y88888P YP | |
set HTTP_PROXY=http://cachex.pdn.ac.lk:3128 | |
set HTTPS_PROXY=http://cachex.pdn.ac.lk:3128 |
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 events = require('events'); | |
const eventEmitter = new events.EventEmitter(); | |
const FREQUENCY = process.env.FREQUENCY_BELOVED || 1000; | |
const WORK_DURATION = process.env.VARIANCE_WORK_DURATION || 10000; | |
const PATIENCE = process.env.LIMIT_PATIENCE || 1000; | |
let alive = null; | |
let beloved = null; |
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 WHITELISTED_ORIGINS = ["https://adeka.lk"]; | |
const PORT = process.env.PORT || 3000; | |
const io = require("socket.io")(PORT); | |
let userCount = 0; | |
// Checks if the socket connection is from a whitelisted origin | |
const isNotWhitelisted = (origin) => { | |
return WHITELISTED_ORIGINS.indexOf(origin) === -1; |