Ruby: Create Hot-Swap - ruby

developers!
I'm currently working on a project in Ruby that requires me to be able to hotswap code whilst it's operating. However, the only method I know (because, to be honest, I am quite new to Ruby) is to do a full reboot, and that takes too long. Is this possible? Do I have to override my code? Include a console? Or something else?
I'd be glad if somebody could help me with my problem.
Best Regards

Related

What kind of anti-debugging technique doesn't allow attaching with usermode debugger?

I'm currently in the process of learning different techniques malware use to prevent debugging, and I came across an issue I can't seem to really understand. This piece of malware that I am currently trying to figure out and debug uses some kind of anti-debugging technique that doesn't allow me to attach a debugger in the first place.
I have tried using things such as Scylla-hide, I've also tried manually going in and hooking common anti-debugging API calls to see what is going on, but no luck so far. I also tried with WinDbg hoping it would give me some error message I can go off of, and it gave me this:
WinDbg output when trying to debug program
So this got me thinking that it was doing something to prevent a thread being started and that is what is causing any debugger from being able to attach. I also tried injecting a DLL with the typical LoadLibrary CreateRemoteThreadEx technique and seems it doesn't allow me to create a thread that way either. I've looked at as much as possible on anti-debugging and can't seem to find an answer to this. Any nudge in the right direction would be greatly appreciated.
I'm hoping to be able to circumvent this in user-mode, as I'm trying to understand what exactly it is doing to stop me from debugging rather than simply bypassing it. This is my first time asking a question so sorry if anything was hard to understand.
This is the defacto antidebug reference by Peter Ferrie, it's an amazing resource: https://anti-reversing.com/Downloads/Anti-Reversing/The_Ultimate_Anti-Reversing_Reference.pdf
It contains almost every known anti-debug method, you can use this reference and tick each method off your list until you find the ones that are implemented, the book should also help you easily mitigate each method as well.
Per our conversation in the comments, the answer to your question was that the process was hooking both DbgBreakPoint and DbgUiRemoteBreakig. Patching them enabled you to then attach a debugger.

Is there a way to record what you do in Sketchup as Ruby script?

I am currently working on designing my own plugin in Sketchup using the Ruby API. I was wondering whether there was any tool/extension that would allow me to record whatever I do in the program as a Ruby macro so that it would make it much easier to produce code to recreate exactly what I want. Any help would be appreciated.
I'm afraid that the SketchUp Ruby API doesn't provide enough insight to the application internals to know exactly what is going on.
You could probably use observer to detect entity creating, modification, deleting - but I am not sure how you would easily reuse it other than creating exactly what you just created.

Collaborative Ruby resources for novices

I am very much a Ruby newb - hoping to migrate to Ruby on Rails (although I have walked through Mike Hartl's Tutorial, which was excellent). I just want to solidify my Ruby knowledge first.
I am working on a hobby Ruby project to help me learn. I am pretty happy with how far I have got so far, but wanted to discuss/share it with other like-minded novice/beginner programmers.
Can anyone point me to a 'community' that promotes collaboration, critisim and discussion on code (ideally Ruby, obvs)?
If such a community doesn't exist, does anyone have any advice on how to find other like-minded programmers working on small-scale scripts/programs?
I have an account on Github, and on here (obviously!). Whilst Github is great for navigating around, cloning and looking at people's code, I don't feel anywhere near the level where I can start to actually contribute to anything and likewise request people look at my code. Maybe I am just being a wuss and I should just jump in the deep end? Perhaps I am not using GitHub correctly as a 'social network'.
Also, from what I can see, StackOverflow is not the place to send out 'Hey, check this out and let me know what you think' type requests either.
Not meant to be a discussion - just whether anyone knows if such 'networks' exist.
It depends on where you're located, but hacknights (Ruby or otherwise) are probably up your alley. There are different flavors (Are you solving a stated problem? Working on something general?) but usually you can work with others in a collaborative and low-stakes environment. I'd suggest searching for "hacknight" in your area and look at any past or upcoming nights.
As an example, see http://www.meetup.com/torontoruby/events/53887372/
RailsCasts - very interesting project for knowing ruby-technologies.
Also you can going to software-company and start working, and you get criticism, discussions and collaboration :)

Using ASIHTTPRequest to download a file with Cocoa/MacRuby

I'm still trying to get a handle on Cocoa (both in Obj-C and MacRuby), and I'd really appreciate seeing how to download a file with ASIHTTPRequest (or without it) and MacRuby. Ideally, I'd like to be able show the progress inside a progress bar too.
Must use a cocoa method for downloading, since open-uri in MacRuby is borken.
Thanks for your help.
Here is an example app doing exactly that using HotCocoa: http://github.com/richkilmer/hotcocoa/tree/master/examples/download_and_progress_indicator
You would have to convert it to normal Cocoa but if you look at http://github.com/richkilmer/hotcocoa/blob/master/examples/download_and_progress_indicator/lib/application.rb you will see the main callbacks defined.
You might want to ask your questions in the MacRuby mailing so people involved with the project can help.
Matt
p.s: The cocoa IO methods are way more stable and efficient than Ruby's. Also keep in mind that you want to do async calls, something net/http won't help you with.
Here are more explanations and an example from the book I'm writting: http://macruby.labs.oreilly.com/ch03.html#_urls_requests_connections Hopefully that will help.

Project in Ruby

I've been coding alot of web-stuff all my life, rails lately. And i can always find a website to code, but i'm kind of bored with it. Been taking alot of courses of Java and C lately so i've become a bit interested in desktop application programming.
Problem: I can't for the life of me think of a thing to code for desktop. I just can't think of anything i can code that isn't already out there for download. So what do i do?
I need some project suggestions that i can set as a goal.
I would say you should roam through github or some other open source site and find an existing young or old project that you can contribute to. Maybe there is something that is barely off the ground, or maybe there is a mature project that could use some improvement.
I find to complete a project, it needs to be something I am passionate about. I feel you need to find your own project I'm afraid.
There is always the Netflix Prize though!
I would write a ray tracer.
Oops, sorry... you're looking for an original idea. :) Ray tracers are still cool, though, and easy to get started on. Maybe you'll get an idea for a game while you're working on it.
Visit shoooes.net for a UI toolkit that's easy and fun, and then the-shoebox.org to see the kinds of things people are doing with it.
If you could make a Ruby ANSI (and xbin, and idf, and adf...) Editor, I would love you. Because that means you would have written ANSI parsing routines that I can hope you release to the open source community.
... but that is a selfish answer. Oh, and a cross-platform editor would be nice as well (although TundraDraw somewhat takes care of that).

Resources