Stack Exchange gore
-
Since blakey is a bit particular about the sanctity of his threads, I'm starting a new one where the unwashed masses can have some fun too.
The only rule is copy/paste the relevant content, as things on stack exchange tend to disappear, especially if they are actually interesting.
-
The reason I started this thread.
-
@cartman82 Yes, I am confused by this as well.
The SE post, that is :)
-
@Rhywden said in Stack Exchange gore:
@cartman82 Yes, I am confused by this as well.
The SE post, that isBank is using a dev server full of debugging metadata to host their production app. WCGW?
-
@cartman82 where are you getting a bank from? Or debugging stuff?
-
@Jaloopa said in Stack Exchange gore:
@cartman82 where are you getting a bank from? Or debugging stuff?
From the SE post?
I am recently working on a project which is using Angular 1.x ES6, this application is hosted on WebPack dev server and webpack itself is dependant on Node npm for installing. I am a bit confused here as Node does provide express server then why would banks (where i am working) use WebPack server and not express server to host. Is it because express server are mostly used for Server Side hosting and webpack is used for Client side HTML angular stuff?? I am very confused in these concepts.
Also see this link to WebPack dev server project page.
-
@Jaloopa said in Stack Exchange gore:
@cartman82 where are you getting a bank from?
Or debugging stuff?
Webpack has a dev server that is sort of used for frontend people to be able to debug their apps. It comes with live reload, it loads everything unminimized with source maps and keeps history of all data that passes through the app (if you're using react). Think multi-megabyte payloads plus low latency memory leak, instead of putting it on nginx or CDN, which is what you're supposed to do.
Basically, this is a HUGE WTF to use in production.
-
And almost certainly this person is confused (since he think that Node "provides the express server for production use"). He's probably getting set up with a front-end project and mistakenly thinks that the dev server is what they're using in production.
At least, I really hope that's what is going on ... this is the internet. Anything is possible.
-
@svieira You could be right. Either way someone's an idiot here.
-
Reading comprehension fail. I must have glossed over both bits each time I read it.
-
@Jaloopa said in Stack Exchange gore:
Reading comprehension fail.
Found another blakeyalt!!!
@Jaloopa said in Stack Exchange gore:
I must have glossed over both bits each time I read it.
Oh, wait, he apologized. I take that back then.
-
@cartman82 said in Stack Exchange gore:
Either way someone's an idiot here.
Is it me? I bet it's me.
-
@blakeyrat you know there are other idiots around, it's not all about you.
-
HA! I'm the kingmaker of stupid Stack Overflow questions.
-
Guy asks whether his python shop would benefit from a build system. Surprisingly, the answer seems to be, no, not really.
-
@cartman82 said in Stack Exchange gore:
Python build system
Surprisingly, the answer seems to be, no, not really.
The one real benefit is that a build system can be in a known clean standard state, so you don't deploy extra random crap without knowing about it or rely on things that are locally but not part of the deployment bundle. It's possible for developers to be clean enough in their habits that they won't fuck up like that, but I wouldn't count on it. I wouldn't trust myself that way for sure…
-
@cartman82 said in Stack Exchange gore:
HA! I'm the kingmaker of stupid Stack Overflow questions.
That's just what Jeff wants you to believe!
-
No. Just no.
-
@Jaloopa I'd actually be kind of impressed if someone could pull that off.
-
@blakeyrat Maybe by getting the service to tell the local AD domain to push some sort of group policy that does the tricky bits? (Can a GPO do that?)
Evil. Convoluted too. Rube Goldberg's software installation.
-
@blakeyrat said in Stack Exchange gore:
I'd actually be kind of impressed if someone could pull that off.
It doesn't seem too difficult TBH. User clicks button on site to install some program, callback adds a job to a queue, service running on the server picks up the job and PSEXECs stuff to the target machine using a service account that has been given admin privs, psexec returns the result of its action, service notices and updates the job queue, site picks up the job status change and shows it to theuser.
But... I have absolutely NO intention of trying this. It would require a domain setup (or the admin accounts to be the same across all possible computers), and a few things already configured to allow this sort of interaction on the user's desktop...
-
@dkf said in Stack Exchange gore:
@blakeyrat Maybe by getting the service to tell the local AD domain to push some sort of group policy that does the tricky bits? (Can a GPO do that?)
Evil. Convoluted too. Rube Goldberg's software installation.
Actually, yes if the website is in his domain and running under an account as member of "Domain\Domain Admin" group, on the domain controller. :P
With the aid of GPMC library, it's possible.
-
@thegoryone said in Stack Exchange gore:
Because I can't use substr there. :) Only regex possible.
There is already custom function for "find and replace". And I just need to find string before 5 last characters. That's why I should use regex.
you're right, but in me case I need to fix regexp for function "Find replace REGEX". So, after I find "Nampa, ID dasfdasf " it will be removed by next function. My task is to fix regexp
Is there a more obvious homework question?
Also that low effort example with "dasfdasf " is a nice extra touch.
-
@cartman82 said in Stack Exchange gore:
Is there a more obvious homework question?
Someone should post as an answer something like:
Read page 231 in your textbook where it describes look behinds.
-
@Tsaukpaetra said in Stack Exchange gore:
@cartman82 said in Stack Exchange gore:
Is there a more obvious homework question?
Someone should post as an answer something like:
Read page 231 in your textbook where it describes look behinds.
Do you even need a look-behind, though? Just capture everything before the last five:
/^(.*).{5}$/
-
@thegoryone bonus WTF: everyone seems to forget about the space before those last 5 characters. I bet his professor won't.
-
@Dreikin said in Stack Exchange gore:
Just capture everything before the last five
That's what I'd do too. Sometimes with REs, the easiest thing is to see if you can do the opposite of what you think you want…
-
@Dreikin said in Stack Exchange gore:
@Tsaukpaetra said in Stack Exchange gore:
@cartman82 said in Stack Exchange gore:
Is there a more obvious homework question?
Someone should post as an answer something like:
Read page 231 in your textbook where it describes look behinds.
Do you even need a look-behind, though? Just capture everything before the last five:
/^(.*).{5}$/
It'd be a look-ahead anyway... something like
/.*(?=.{5}$)/
.Either one would work, really. I guess the main difference is, if you're using
match
, the result is an array, which will include the whole match, in addition to any matching subexpressions:edit: since the regexp is greedy, and you're not using the
g
flag to match more than once, all of the position-matching characters (^$
) can be omitted and they'll work exactly the same:
-
This post is deleted!
-
@Dreikin said in Stack Exchange gore:
Do you even need a look-behind, though? Just capture everything before the last five:
NFC I don't RegEx if I can help it.
Edit: Why Cooties? Microbursts are so last decade ago!
-
@Jaloopa
Someone's trying to get easy tricks for writing a Trojan.