Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
czg
Dec 17, 2005
hi
Alright, thanks for the tip.

Adbot
ADBOT LOVES YOU

surc
Aug 17, 2004

Is there a not-horifically painful way to read a hexdump?
I generally steer clear of hex editing, but apparently in order to get a server for the game "The Ship" running I have to edit one of the binaries with an updated ip address. :psyduck:

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

surc posted:

Is there a not-horifically painful way to read a hexdump?
I generally steer clear of hex editing, but apparently in order to get a server for the game "The Ship" running I have to edit one of the binaries with an updated ip address. :psyduck:

That goes in the Coding Horror thread.

Kenishi
Nov 18, 2010

surc posted:

Is there a not-horifically painful way to read a hexdump?
I generally steer clear of hex editing, but apparently in order to get a server for the game "The Ship" running I have to edit one of the binaries with an updated ip address. :psyduck:

If the IP address is hard coded then just get something like HxD and try searching for the Hex of the IP address. Additionally you can grab a disassembler like IDA and disasm the binary and do a search for the library calls to socket library connect(), see where the hard coded IP's offset is in the binary and just write that down. That way in the future you can just use a hex editor like HxD and do it manually. Of course the disassembler should allow you to modify it too.

Normy
Jul 1, 2004

Do I Krushchev?


Since there's been some discussion about learning algorithms, Coursera has just started a class on the subject. I believe it's not too late to join, and each week they're including some job interview questions in the material. https://class.coursera.org/algs4partI-004

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
I am curious about a good Lua toolchain. I was using sylvanaar2's Lua plugin for IntelliJ, but it comes with a bugged LuaJ release--an alpha3 that I think has a string caching problem that caused some hair loss last night. It also can't run a debugger with that prebundled version, and I can't switch the interpreter on it to the "regular" lua.exe in an existing project. I couldn't get LuaEclipse to install; it was probably because it couldn't install on Eclipse versions newer than Eclipse 5 or something. I tried to install a Lua plugin for VS2010 and it appears to have done absolutely nothing.

I'm wondering what is available to me openly for editing Lua scripts and debugging them. I am natively running Windows but I have an Ubuntu instance in a VM. I'm looking for a debugger, syntax highlighting, and preferably something to yell at me whenever I use a global. I have been doodling in the language to do something crazy with the mining turtles in the ComputerCraft Minecraft mod, but I have all those specific API calls mocked out so I can test all the algorithmic stuff locally.

My default is to kind of just go down this list and see what happens:
http://lua-users.org/wiki/LuaIntegratedDevelopmentEnvironments

But that's very tedious.

fankey
Aug 31, 2001

Rocko Bonaparte posted:

I am curious about a good Lua toolchain.

ZeroBrane?

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
I'll try it tonight on the single virtue that it has been actually updated in the past 3 months. Thanks!

Update: Seems to work quite fine. I only got to play with it a little but I got it to start up the debugger, and walk through some stuff. I could go to lines of code in error traces, and there wasn't any fuss getting my source in.

Rocko Bonaparte fucked around with this message at 16:01 on Feb 5, 2014

Pilfered Pallbearers
Aug 2, 2007

Can someone give me a simple way (or point me in the direction of the correct resource) to create a script that creates a .ics file with multiple events from a set of plain text?

Here's the plain text I would be using. The formatting would be the same every time, but the times and date would change week by week. I'd like something that can spit out a .ics for these events with just copy/paste. Something through os X would be ideal, but not necessary.

code:
Schedule begins Feb 08, 2014 	Start 						Finish 	
Saturday 	  	xx:xxAM 	                      	x:xxPM 	      
Sunday 	  	00:00AM 	                      	00:00AM 	      
Monday 	  	x:xxAM 	                      	x:xxPM 	      
Tuesday 	  	xx:xxAM 	                      	x:xxPM 	      
Wednesday 	  	xx:xxPM 	                      	x:xxPM 	      
Thursday 	  	xx:xxAM 	                      	xx:xxAM 	      
Friday 	  	x:xxPM 	                      	xx:xxPM 	     

Scaevolus
Apr 16, 2007

Kingnothing posted:

Can someone give me a simple way (or point me in the direction of the correct resource) to create a script that creates a .ics file with multiple events from a set of plain text?

Here's the plain text I would be using. The formatting would be the same every time, but the times and date would change week by week. I'd like something that can spit out a .ics for these events with just copy/paste. Something through os X would be ideal, but not necessary.
I wrote a script to do this for my college class schedule, it might be a good starting point: http://uiuccalendar.appspot.com/

Dr. Poz
Sep 8, 2003

Dr. Poz just diagnosed you with a serious case of being a pussy. Now get back out there and hit them till you can't remember your kid's name.

Pillbug
This is kind of a weird request but this seemed to be the best place to ask:

Does anyone remember a blog that was troll bait for developers. I remember one specific post that was discouraging people from writing to/reading from files and databases and instead to use the Windows registry. It was written totally straight faced and with a good technical insight but there were several posts and all had equally ridiculous premises. Does anyone have a link to this or have some search terms to go off of? My googling efforts so far have gotten me nowhere.

shrughes
Oct 11, 2008

(call/cc call/cc)

Girl With Huge Tits posted:

This is kind of a weird request but this seemed to be the best place to ask:

Does anyone remember a blog that was troll bait for developers. I remember one specific post that was discouraging people from writing to/reading from files and databases and instead to use the Windows registry. It was written totally straight faced and with a good technical insight but there were several posts and all had equally ridiculous premises. Does anyone have a link to this or have some search terms to go off of? My googling efforts so far have gotten me nowhere.

http://cspangled.blogspot.com/2010/09/better-way-of-logging.html

Edit: The way I found the site was to click the Search the Forums link at the top, limit my search to CoC, search for blogspot.com, and then look at the posts in the Coding Horrors thread starting with the oldest ones.

Dr. Poz
Sep 8, 2003

Dr. Poz just diagnosed you with a serious case of being a pussy. Now get back out there and hit them till you can't remember your kid's name.

Pillbug
Thanks for linking, and especially for describing how you found it. I really appreciate it and my team is getting some enjoyment out of it.

Fedaykin
Mar 24, 2004
Can somebody recommend a book that covers the general history and development of computer companies, operating systems, programming languages, standards, etc? It doesn't need to be terribly technical, just help give me a better understanding of why and how things stand as they are today.

JawnV6
Jul 4, 2004

So hot ...
It's not comprehensive of all the things you list, but I found What the Dormmouse Said to be an enjoyable read about some of the founders of computing. Everyone should know about the Mother of All Demos.

I doubt a single volume could contain all those topics.

shrughes
Oct 11, 2008

(call/cc call/cc)
I got all my knowledge in 3rd grade from Dr. An Wang: Computer Pioneer

Thank you Mrs. Klempner for making me hate IBM.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

Girl With Huge Tits posted:

This is kind of a weird request but this seemed to be the best place to ask:

Does anyone remember a blog that was troll bait for developers. I remember one specific post that was discouraging people from writing to/reading from files and databases and instead to use the Windows registry. It was written totally straight faced and with a good technical insight but there were several posts and all had equally ridiculous premises. Does anyone have a link to this or have some search terms to go off of? My googling efforts so far have gotten me nowhere.
Probably not what you're looking for, but this one is loving hilarious:

https://medium.com/cool-code-pal

Doctor w-rw-rw-
Jun 24, 2008

Pollyanna posted:

Hey it's not like I'm lazy or something, I'm just crap at teaching myself things. :saddowns: I wouldn't be averse to a mentorship or something, some sort of rails at least. And I've mentioned before that without a clear goal I flounder and don't really learn anything, which is why I started to do projects - that and they look good on a resume.

I've found that code review where someone spergs out over and nitpicks your code until they accept it has helped me learn a lot.

The prerequisite (or corequisite) for this, though, is learning commit discipline so you don't just use source control as a checkpoint - you need to be able to separate commits by function. This is made easier by some visual source control tools like SourceTree.

vvv "Don't just" != "Don't". I do the same thing. Checkpoint, but squash into functionality, separating if necessary.

Doctor w-rw-rw- fucked around with this message at 21:48 on Feb 8, 2014

Hughlander
May 11, 2005

Doctor w-rw-rw- posted:

The prerequisite (or corequisite) for this, though, is learning commit discipline so you don't just use source control as a checkpoint - you need to be able to separate commits by function. This is made easier by some visual source control tools like SourceTree.

Counterpoint: Do use it as a checkpoint, and then use an interactive rebase to make it functional prior to the code review. Commits are cheap, the # of times lately I've gone down a blind alley realized it, and backed up 2-3 hours of time and resumed is really drat large. (I'm in a totally unfamiliar part of the codebase in a different language than normal.) If I'd waited to commit until it was functionally ready I'd probably start over instead.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.
e: Hughlander actually said everything I wanted to say. Whoops!

pipes!
Jul 10, 2001
Nap Ghost
I have two computers, with two account Short Names (let's say Godzilla and Mothra), using Dropbox and symlinks to sync my Bash aliases, history, and profiles between the two computers. Things were all well and good for awhile, but I find myself spending more time in the terminal now, and I'm starting to run into issues where the different Short Names is causing annoying issues.

I did a little research and it seems like Apple really isn't a fan of you changing your account Short Name, to where it seems like it'd be safer to just make a new account, which I'd really like to avoid for effort's sake. Is there any other way around this that doesn't mean having to give up on the symlink syncing?

Sorry if I'm not using the correct terminology here, it's hard to search/ask for things you don't quite grok yet.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

pipes! posted:

I have two computers, with two account Short Names (let's say Godzilla and Mothra), using Dropbox and symlinks to sync my Bash aliases, history, and profiles between the two computers. Things were all well and good for awhile, but I find myself spending more time in the terminal now, and I'm starting to run into issues where the different Short Names is causing annoying issues.

I did a little research and it seems like Apple really isn't a fan of you changing your account Short Name, to where it seems like it'd be safer to just make a new account, which I'd really like to avoid for effort's sake. Is there any other way around this that doesn't mean having to give up on the symlink syncing?

Sorry if I'm not using the correct terminology here, it's hard to search/ask for things you don't quite grok yet.

What specifically is the issue with having two different usernames? Maybe they're easily solvable.

Also you can change your username in the Users & Groups pane of System Preferences. I think that handles most/all of the weirdness, but you'll know better than us how you have things set up and what might break.

Strong Sauce
Jul 2, 2003

You know I am not really your father.





pipes! posted:

I have two computers, with two account Short Names (let's say Godzilla and Mothra), using Dropbox and symlinks to sync my Bash aliases, history, and profiles between the two computers. Things were all well and good for awhile, but I find myself spending more time in the terminal now, and I'm starting to run into issues where the different Short Names is causing annoying issues.

I did a little research and it seems like Apple really isn't a fan of you changing your account Short Name, to where it seems like it'd be safer to just make a new account, which I'd really like to avoid for effort's sake. Is there any other way around this that doesn't mean having to give up on the symlink syncing?

Sorry if I'm not using the correct terminology here, it's hard to search/ask for things you don't quite grok yet.

Do you mean the name in the /Users/ folder? Why not just reference it as ~/ or do `whoami` in your bash scripts?

Larz2021
Feb 2, 2001
Is there any better advice on how to use a local sql DB in a C# app without it overwriting your data every time then this old blog? I keep trying to use their tools and only end up screwing things up even worse just to make entries save to an actual persistent DB.

more like dICK
Feb 15, 2010

This is inevitable.
If I want to mess around with Ada on OSX, am I better off with GPS or GNATBench?

edit:
Answering my own question here but it seems like vim and gnat is the most sane way to start. Ada is cool

more like dICK fucked around with this message at 00:44 on Feb 10, 2014

pipes!
Jul 10, 2001
Nap Ghost

pokeyman posted:

What specifically is the issue with having two different usernames? Maybe they're easily solvable.

I keep running into trouble when installing/managing packages. I did re-check my Bash profile, and managed to find this. I can't for the life of me remember where it came from:

Bash code:
if [ -f "$HOME/.bash_ps1" ]; then
. "$HOME/.bash_ps1"
fi
[[ -s "/Users/godzilla/.rvm/scripts/rvm" ]] && source "/Users/godzilla/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

Assuming the explicitly-named godzilla here is the culprit?


Strong Sauce posted:

Do you mean the name in the /Users/ folder? Why not just reference it as ~/ or do `whoami` in your bash scripts?

So, if the above is the issue, I should just be able to change /Users/godzilla to just ~/, right?

Again, sorry for the awkward phrasing. Seems like I know just enough to know I know nothing.

Strong Sauce
Jul 2, 2003

You know I am not really your father.





Oh right you can probably just use $HOME

The last line comes from rvm which automatically writes that when you install it, just replace /Users/godzilla with $HOME. This is assuming you have rvm installed in both accounts.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

pipes! posted:

I keep running into trouble when installing/managing packages. I did re-check my Bash profile, and managed to find this. I can't for the life of me remember where it came from:

[snip]

Assuming the explicitly-named godzilla here is the culprit?


So, if the above is the issue, I should just be able to change /Users/godzilla to just ~/, right?

Again, sorry for the awkward phrasing. Seems like I know just enough to know I know nothing.

The last line comes from RVM and was added during its installation. That's a particularly stupid hardcoded path, and your fix or Strong Sauce's should work great.

I'm not sure this is causing your problem with packages though, unless your package manager uses Ruby (e.g. homebrew). If it's still broken, can you paste in a command and its output?

kedo
Nov 27, 2007

No clue where exactly to post this, so I guess I'll try here first.

Earlier today I noticed that a client's account on our server had a bunch of perl processes running. This was odd to me because the account is just basic hosting for a WordPress site. So looking into it I found this file sitting in their cgi-bin, called chanst.pl

Is this what it looks like? I don't know perl or Russian, but this sure looks like a bot script to me? Also any recommendations for what to do here besides deleting the file (which I already did), updating WordPress and changing passwords?

pipes!
Jul 10, 2001
Nap Ghost

Strong Sauce posted:

Oh right you can probably just use $HOME

The last line comes from rvm which automatically writes that when you install it, just replace /Users/godzilla with $HOME. This is assuming you have rvm installed in both accounts.

pokeyman posted:

The last line comes from RVM and was added during its installation. That's a particularly stupid hardcoded path, and your fix or Strong Sauce's should work great.

I'm not sure this is causing your problem with packages though, unless your package manager uses Ruby (e.g. homebrew). If it's still broken, can you paste in a command and its output?

Yuuuuuuup, I've got RVM. Thanks for the quick advice and answer! I just updated my bash profile, and I'll definitely post if I run into one of those errors again.

nielsm
Jun 1, 2009



kedo posted:

No clue where exactly to post this, so I guess I'll try here first.

Earlier today I noticed that a client's account on our server had a bunch of perl processes running. This was odd to me because the account is just basic hosting for a WordPress site. So looking into it I found this file sitting in their cgi-bin, called chanst.pl

Is this what it looks like? I don't know perl or Russian, but this sure looks like a bot script to me? Also any recommendations for what to do here besides deleting the file (which I already did), updating WordPress and changing passwords?

Yeah that's definitely some sort of attack proxy/bot.

First, if you're hosting things for others, consider why you're giving them cgi-bin access, it's not exactly a common thing to use today. Since the script forks itself to daemonnize, consider putting some process limits in place, the user shouldn't be able to have many more processes than required to keep the HTTP server running. It also tries to add itself to the crontab, regular hosting users usually shouldn't be able to do that either, I'd think.

Lastly, if the installation was attacked through a WordPress bug, consider whether it's the client's responsibility to keep that updated. Perhaps do automatic internal penetration testing, if you have the resources for it. If you can attack a hosted site using a known vulnerability, shut off that site then.

kedo
Nov 27, 2007

nielsm posted:

Yeah that's definitely some sort of attack proxy/bot.

First, if you're hosting things for others, consider why you're giving them cgi-bin access, it's not exactly a common thing to use today. Since the script forks itself to daemonnize, consider putting some process limits in place, the user shouldn't be able to have many more processes than required to keep the HTTP server running. It also tries to add itself to the crontab, regular hosting users usually shouldn't be able to do that either, I'd think.

Lastly, if the installation was attacked through a WordPress bug, consider whether it's the client's responsibility to keep that updated. Perhaps do automatic internal penetration testing, if you have the resources for it. If you can attack a hosted site using a known vulnerability, shut off that site then.

All good points. I think I'll go in and remove cgi-bin access for everyone, as I don't think anyone has a reason to use it. And we probably need some sort of policy about WordPress updates. Thanks much!

nwin
Feb 25, 2002

make's u think

Edit: moved-found a thread more relevant.

nwin fucked around with this message at 02:53 on Feb 11, 2014

Lareous
Feb 19, 2008

Maybe someone can help with this.

I have a project involving an online employment application where the HR person wants the hiree to fill out the form online, hit submit, and have a pre-populated PDF sent to her email with the info that the hiree entered already filled out.

Is this possible to do without a database or should I just bite the bullet and learn some SQL?

Computer viking
May 30, 2011
Now with less breakage.

Lareous posted:

Maybe someone can help with this.

I have a project involving an online employment application where the HR person wants the hiree to fill out the form online, hit submit, and have a pre-populated PDF sent to her email with the info that the hiree entered already filled out.

Is this possible to do without a database or should I just bite the bullet and learn some SQL?

It's entirely possible; you can store the entries in a text file or something and look up the right line by email/SSID/phone number/whatever reasonably unique information you both store and can ask the candidate to reproduce. Mind your locking when writing to it, though.

That said, I would use a database; it will be easier in the long run.

As for PDF, it depends on what tools you can put on the server; one possibility is to fill the info into a LaTeX document and render a PDF from that. (Which would be entirely ignorant of how you store your data.)

Computer viking fucked around with this message at 18:04 on Feb 11, 2014

EAT THE EGGS RICOLA
May 29, 2008

Lareous posted:

Maybe someone can help with this.

I have a project involving an online employment application where the HR person wants the hiree to fill out the form online, hit submit, and have a pre-populated PDF sent to her email with the info that the hiree entered already filled out.

Is this possible to do without a database or should I just bite the bullet and learn some SQL?

This does not require a database. An easy way to do it (this example uses Ruby, but there are libraries for whatever language you want to do this in) would be to just set up a form using something like Sinatra, take the information posted to the form and pass it over to something to generate a pdf, then use something to send the email with the attachment.

It's probably easier would make more sense to just render the data as the body of the email, but I guess HR people love their PDFs.

If you ever wanted to re-generate the PDFs or whatever, then you would need to either just store them somewhere or to persist the info in a database.

Computer viking
May 30, 2011
Now with less breakage.

I think he wants to merge the form data with pre-stored info about the candidate?

EAT THE EGGS RICOLA
May 29, 2008

Computer viking posted:

I think he wants to merge the form data with pre-stored info about the candidate?

That wasn't my understanding, but if that's the case and that data is already stored in a database, there's still no need to store the form data in one. You would just pull the preexisting data from the database, in combination with the fields from the form, and throw all of that to prawn or whatever you were using to make your pdf.

Lareous
Feb 19, 2008

EAT THE EGGS RICOLA posted:

That wasn't my understanding, but if that's the case and that data is already stored in a database, there's still no need to store the form data in one. You would just pull the preexisting data from the database, in combination with the fields from the form, and throw all of that to prawn or whatever you were using to make your pdf.

Well the scenario is this: Someone wants a job, they go to this application page and fill it out. We wouldn't have any data on them beforehand. What I would LIKE to happen is to use the information from that form to populate a PDF template file have with the W4 and everything.

Adbot
ADBOT LOVES YOU

EAT THE EGGS RICOLA
May 29, 2008

In that case, my initial reply is what I would do, there's no need to persist the data unless you're going to be using it for something else too.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply