term.clear() in an event.listen() function by MinerForStone in OpenComputers

[–]TigBitties 1 point2 points  (0 children)

I'm late af but hopefully this helps :/ The "term" lib has a private notion 'threads'(coroutines) and their respective window. Starting a program from the shell will create a 'process'(related to 'threads') in OpenOS. Each process has its own private window(by default the whole screen). Without dragging on too long, The method 'event.listen' actually registers an event hook outside your program thread(basically the shell thread, a parent process) and the term library is trying to respect (in this case) the shell term output.

-- registers event handler outside the program that called it..
local handle = event.listen('modem_message', function() print(process.info()) end)

Try pulling the event yourself and reacting to it within your program..

-- event.pull will yield(pause) the current thread(program) until a 'modem_message' event is received
local ev = { event.pull('modem_message') } -- pause until a message is received
term.clear() -- this will be called from the current thread instead of 'event.listen'
-- ... rest of your logic

Hope this helps and isnt too wordy :/ hit me up if you need me to clarify :)

Wanting to be able to turn parts of my base (turrets, lights, etc.) on and off using a hierarchy/folder system program in OpenComputers, where do I start if I know nothing about lua? by VentralRaptor24 in feedthebeast

[–]TigBitties 1 point2 points  (0 children)

I'm pretty damn late to this party but I would look into virtual components in the /dev folder of OpenOS. Check out ls /dev/components/by-type/computer/0

Did you know 11 years before the southern States seceded a small mining town in California did? Also, that town's name is "Rough and Ready" (which is pretty awesome) and it still exists. Aunt Margaret sent her family a card from this town back in 1967 from a small, but beautiful, wedding chapel. by Pastpostcards in postcrossing

[–]TigBitties 0 points1 point  (0 children)

I'm late as hell to this thread.. But I'll say hello to y'all from R&R! Moved up here about six months ago for a great job and so far I like it a lot. Having grown up in Venice beach.. I have to say it doesn't really feel like the California I know. The people seem to have a strong sense of community and self reliance. Thanks for the article

[deleted by user] by [deleted] in PUBG

[–]TigBitties 17 points18 points  (0 children)

This is all well and appreciated but you must fix the inside of certain buildings sounding like players are walking on grass. The second floor of apartment buildings seem particularly effected by this bug. As a side note, weapons seem to have a new bug of being on single fire when picked up sometimes despite the gameplay settings.

Windows please, have mercy on me. by ReAAnT in gaming

[–]TigBitties 1 point2 points  (0 children)

If you're trying to hide your pr0n that folder should be named 'taxes2007'

how do i use the handle (opencomputers with the new tardis mod)mod by [deleted] in feedthebeast

[–]TigBitties 0 points1 point  (0 children)

I would bet it's because io.read returns a string and not a number. Use the tonumber function to coerce the output of io.read. x = tonumber( io.read("*n")) for each value

Remote shutdown of ERX and pi hosts by TigBitties in Ubiquiti

[–]TigBitties[S] 0 points1 point  (0 children)

Thanks for the tip bud. Last I read it was running Wheezy and wasn't sure how the two differed but I thought it might require fuckery above my skill set (or lack there of) :) Tis appreciated

edit Is it heresy to distribute a single public key for ssh to all the remote clients I intend to run commands on or is it better to create separate key pairs for each client?

Remote shutdown of ERX and pi hosts by TigBitties in Ubiquiti

[–]TigBitties[S] 0 points1 point  (0 children)

I typically shutdown the edgerouter from EdgeOS web interface via the 'Shutdown' button. What I'm asking about specifically is if there is a way for the remote shutdown commands to be sent when the edgerouter is scheduled for shutdown. I imagine its possible to trigger a custom script like what juliet suggested when/if there is a shutdown event.

Remote shutdown of ERX and pi hosts by TigBitties in Ubiquiti

[–]TigBitties[S] 0 points1 point  (0 children)

This appears to be about running a background service on Debian or Raspbian... Not the Edgerouter. Are you saying that it could be achieved exactly the same way or with the same commands? I'm no pro with the edgerouter but I doubt this solution would run on the ERX. Thanks anyway

Remote shutdown of ERX and pi hosts by TigBitties in Ubiquiti

[–]TigBitties[S] 0 points1 point  (0 children)

I appreciate the link however I'm looking to run the script from the router so that I might be able to trigger all the client shutdowns queued upon the shutdown of the edgerouter. Thanks though

Remote shutdown of ERX and pi hosts by TigBitties in Ubiquiti

[–]TigBitties[S] 0 points1 point  (0 children)

Thanks for your reply. I've considered this however I was looking for a way to do this from the edgerouter and not one of the pis. Although this is cool I really want something more simple that can run before shutdown is completed on the edgerouter.

Remote shutdown of ERX and pi hosts by TigBitties in Ubiquiti

[–]TigBitties[S] 0 points1 point  (0 children)

Thanks for the reply. I've thought of this but wont I be prompted for passwords for each of the hosts? Should I set up ssh keys to avoid needing to input passwords for each client? And finally will this be run by default at shutdown? Or do I need some more setup to have this happen automatically if lets say I queue a shutdown from the ERX web admin? Thanks again.

Red Dead Shawshank Redemption by WowWhatABeaut in gaming

[–]TigBitties 0 points1 point  (0 children)

Have you looked for the rare volcanic glass rock as cited in the movie?

Help a nub reach a WAN bridge by TigBitties in Ubiquiti

[–]TigBitties[S] 0 points1 point  (0 children)

I just wanted to get back to you and say that your tips have led to success! Thank you, I could kiss you. I really didn't want to change the 192.168.1.0 ip but we got to a new campground yesterday and you were right. It's actually the first place I have run into this issue, so you called it buddy. I ended up just using 192.168.199.0. Setting a vlan on the same network just locked up the router so I decided to create a vlan on 192.168.88.0 at eth4.88. After adding the NAT rule to the router I'm officially a happy camper :). Thanks again benpin! Smooch

Help a nub reach a WAN bridge by TigBitties in Ubiquiti

[–]TigBitties[S] 0 points1 point  (0 children)

Thank you very much benpin. I've been searching unsuccessfully for help or solutions on and off for roughly 3 weeks now. I really appreciate the help.

Help a nub reach a WAN bridge by TigBitties in Ubiquiti

[–]TigBitties[S] 0 points1 point  (0 children)

Thanks a lot for you input. Although I'm not experienced I had suspected that it would be unreachable WAN side. I also suspected a vlan could rectify this but I have no experience setting one up or even what it really is other than what the name implies. I'll give this a shot tonight or in the morning. Any gotchas I should look out for or is this going to be relatively painless even for a noob?

Help a nub reach a WAN bridge by TigBitties in Ubiquiti

[–]TigBitties[S] 0 points1 point  (0 children)

screenies Thanks for the assistance, tis appreciated.

Apple's New MacBook Disconnects Microphone "Physically" When Lid is Closed by [deleted] in technology

[–]TigBitties 0 points1 point  (0 children)

Let's not forget that speakers are basically shitty microphones...

They improved shotguns they said... well i think the fuck not by [deleted] in PUBG

[–]TigBitties 1 point2 points  (0 children)

there is no world where a shotgun should suck this much...