Main > Forum/Website Discussion

Rigby shares about Sandheaver and people make wild accusations

<< < (5/27) > >>

Hoopz:

--- Quote from: Le Chuck on May 15, 2013, 11:46:17 pm ---
--- Quote from: lordnacho on May 15, 2013, 11:17:37 pm ---I posted in the "no frontend" thread giving a suggestion, so he/she(didn't know this) sent me a PM with the code.  This was part of it:
"I didn't post this in that thread because those f**kers are a**holes."

Just thought you guys would want to know :)

--- End quote ---

Sweet.  Post the code.

--- End quote ---

Here:


--- Quote ---// launch this via "node launcher.js".
// to select a game, visit the hosting computer's IP address in a web browser.
// example: http://192.168.1.50:1337/?game=dkong
// This should launch Donkey Kong on the computer running the app.

// You'll need to configure the following 3 lines to match your environment:
var mameDirectory = "d:/mame/";
var mameExe = "mame64.exe";
var mameOptions = ""; // like '-window' or maybe '-video ddraw' or whatever.
var kill = 'taskkill.exe /pid';
var psgrep = 'tasklist /fo csv | findstr';

// no configuration below this line //
var http = require('http');
var url = require('url');
var execa = require('child_process').exec;  // rename exec() to execa() to make room for synchronous exec.


require('shelljs/global');  // npm install shelljs - this is where synchronous exec() comes from.

var child;
var childpid;

http.createServer(function (req, res) {
   var queryData = url.parse(req.url, true).query;

   res.writeHead(200, {'Content-Type': 'text/html'});
   
   function launch(game) {
      game = game.replace(/;.*$/, ''); // strip out sneaky ---steaming pile of meadow muffin--- on unix & mac.
      game = game.replace(/&.*$/, ''); // strip out sneaky ---steaming pile of meadow muffin--- on windows.
     
      child = execa(mameExe + ' ' + mameOptions + ' ' + game, { cwd: mameDirectory }, function(error, stdout, stderr) {
         if (error) { res.write(stderr); }
         if (stdout) { console.log(stdout); }
         if (stderr) { console.log(stderr); }
      });
   }
   
   if (queryData.game) {
   
      childpid = exec(psgrep + ' ' + mameExe, {silent:true}).output.split(',')[1];
     
      if (childpid) {
         // you'll need to modify this for unix. //
         childpid = childpid.replace(/"/g, '');
         console.log('killing mame.');
         exec(kill + ' ' + childpid, {silent:true});
      }
     
      res.write('hello ' + queryData.game + '.\n');
      console.log('launching ' + queryData.game);
     
      if (queryData.game != 'exit') {
         launch(queryData.game);
      }
     
      child.on('exit', function(code) {
      //   console.log('game exited: ' + code);
         child = null;
      });
     
   } else {
      res.write("You didn't mention a game.  Here's a quick list to get started.<br/>");
   }
   
   res.write('<h1>Some popular games:</h1>');
   res.write('<a href="/?game=dkong">Donkey Kong</a><br/>');
   res.write('<a href="/?game=dkongjr">Donkey Kong Jr.</a><br/>');
   res.write('<a href="/?game=mspacman">Mrs. Pac-man</a><br/>');
   res.write('<a href="/?game=galaga">Galaga</a><br/>');
   res.write('<a href="/?game=frogger">Frogger</a><br/>');
   res.write('<a href="/?game=digdug">Dig Dug</a><br/>');
   
   res.end('done.\n');
}).listen(1337, '0.0.0.0');

console.log('Server running at http://[your ip]:1337/');
--- End quote ---

lordnacho:
Beat me by 5 seconds

Vigo:

--- Quote from: saint on May 16, 2013, 07:20:11 am ---
--- Quote from: Vigo on May 16, 2013, 12:34:16 am ---Besides, it really shouldn't be a big deal. A woman should know that when she shows up to the boys' card game that there will be a bit of name slinging going around. I guess not many women can be perfect like Jennifer.  ;)

--- End quote ---

Point of clarification - not a boys' card game, this is a St.Clair invitational with all genders, gender preferences, races, and political bents welcomed. No sexism please - if in doubt I'd prefer folks err on the side of caution. :)

Thanks!

--- saint


--- End quote ---

 :cheers: Right on, as it should be.

I'll clarify my point as well. In the real world, I work in an office where the department I work in is about 30 women and I am the only man. It has been that way for years. Well, they often forget there is a man present and will talk about things like lady cramping, how evil men are, the obscene parts of romance novels, etc. Some days in my life it is like someone turned on "the view" then tossed the remote under a streamroller. My point is that I know the demographic I am generally surrounded in and am very understanding around unfiltered women-speak on a daily basis. My hope is that anyone who joining us that is outside of the common demographic will be a bit more forgiving of us when we fail at being on our absolute bestest behavior.   ;)

Nephasth:

--- Quote from: 404 on May 15, 2013, 08:07:58 pm ---still cant understand why the delete account and posts option is enabled on this forum. It's a nightmare not only for valuable information that could be gone forever, it's also terrible from an SEO perspective. Figured this would have still been fresh in people's minds from the PBJ incident.

--- End quote ---

I still can't delete my own posts... Good thing the mods can clean up after me though. ;)

Le Chuck:
I can.  I just did to make sure, my "sweet post the code" post is gone.  What theme are you using.  Back in Black (or whatever it's called) has a little "remove" icon in the top right corner of my posts.  I can't delete entire threads but I can clean up a post licketysplit.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version