Last active
August 29, 2015 13:56
-
-
Save aessam/9152198 to your computer and use it in GitHub Desktop.
Share your screen to local network, it can be helpful in cases of meetings and you don't have projector, be creative and use it as much.
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 imgStr = ""; | |
| setInterval(function(){ | |
| // Make sure to change the command based on the OS you are using. | |
| require('child_process').spawn('screencapture', ['-C', '-x','cme.png']).on('close', function (code) { | |
| imgStr = require("fs").readFileSync('cme.png','base64'); | |
| }); | |
| },1000); | |
| require("http").createServer(function(req,res){ | |
| res.end('<meta http-equiv="refresh" content="1"> <img src="data:image/png;base64,' + imgStr + '" style="height: 100%;">/'); | |
| }).listen(8080); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment