« first day (111 days earlier)      last day (4838 days later) » 

8:01 PM
Toor, the word "root" spelled backwards, is an alternative superuser account in Unix-like operating systems, particularly BSD and variants. Purpose In Unix, it is traditional to keep the root filesystem as small as reasonably possible, moving larger, fancier programs and rapidly-changing data to other, optional parts of the system. This increases the likelihood that the system can be brought to a semi-usable state in the case of a partial system failure. It also means that the superuser account, necessary for repairing a broken system, should not depend on any programs outside of this sm...
 
ah hah :)
Shame I dont have shell access
Plesk - we are crap - Control Panel
 
all control panels are crap. But they serve their purpose
 
Self hosting is becoming a viable option now, due to my non-existant public
 
Quick question: is it supported syntax to pass a negative number as the first argument to substr? Works as expected in FF: "testing".substr(-1,1) == "g"
Safe to use?
 
whoops
 
8:07 PM
@ircmaxell @Nathan @yc are there any linux applications that support server monitoring and API hooks?
 
what do you mean API hooks?
 
as in i could write an app for iphone/ipad that would read the servers stats
 
Nagios () is a popular open source computer system and network monitoring software application. It watches hosts and services, alerting users when things go wrong and again when they get better. Nagios, originally created under the name NetSaint, was written and is currently maintained by Ethan Galstad, along with a group of developers actively maintaining both official and unofficial plugins. N.A.G.I.O.S. is a recursive acronym: "Nagios Ain't Gonna Insist On Sainthood", "Sainthood" being a reference to the original name NetSaint, which was changed in response to a legal challenge by owne...
 
Nagios is the best
 
@Josh yes, that has been normal since JS 1.0. developer.mozilla.org/en/JavaScript/Reference/Global_Objects/…
 
8:09 PM
@Nathan great thanks!
 
Yes, we use Nagios with success. It takes some attention to set up well.
 
@ircmaxell perfect thank you
 
Yeah, but once you get a setup template done, it's trivial to add/remove servers and services
 
we have a very heterogenous environment, and in some cases it's hard to detect the difference between "working" and "broken"
For example, there's a hideous app for printing things built on MS Word macros. Word routinely consumes 100% of available CPU, so 100% CPU utilization does not indicate "broken".
 
I've got Nagios monitoring 31 servers and 151 services right now
 
8:12 PM
Actually for those, we just hardcode "broken"
 
@Nathan: I would indicate 100% utilization does indicate broken. As well as using word macros for anything indicates broken as well..
 
101 hosts, 334 services :P
 
:-P
I have a higher service density
 
good for you!
 
:-P
 
8:13 PM
@ircmaxell @Nathan What the hell do you guys do :O
 
I got really in to Nagios a few years ago. I thought, "this is test suites for sysadmins!"
@MylesGray DDOS
not really
 
@Nathan Awwh - I was hoping for a traffic boost
 
@MylesGray: I am a lead developer (less and less lately tho), IT Administrator (Less and less lately too) and a IT Solutions Expert (not my name for it)
 
I work in IT at a hospital, coping with sucky commercial software and sometimes writing our own sucky software.
 
One problem with eating Sesame Chicken at work. Sesame seeds getting stuck between teeth...
 
8:17 PM
@Nathan @ircmaxell what do you recommend as the WebGUI for nagios?
 
I use the default to be honest (mainly the hostgroup grid summary)
NagDroid didn't support digest auth (and I'm not about to release it public facing without digest), so I haven't used that...
 
@MylesGray the default, but I put some fancier skin on it so management would think it was commercial software.
 
@Nathan: an OS skin?
 
yes
@ircmaxell Nuvola something something
 
8:20 PM
Your management sounds very farmiliar - trying to get them to accept Untangle firewall was near impossible "but it's free so it cant be safe"
 
I am the management (for that kind of thing)
Interesting...
I'd love a frontend that integrated Nagios with Munin
 
My management is pretty open to FOSS because I've demonstrated success a lot, but I realized at one point that many users and especially managers look at the skin-deep appearance, so if something is as ugly as the default Nagios, they'll assume it sucks more than the slick expensive (and dysfunctional) monitoring dashboard someone trys to sell them.
 
yeah
I prefer the enemic frontend though. It's straight to the point which is what I need.
But the map is amazing
 
Munin?
 
8:24 PM
In practice, once the email/pager/text notifications are set up, we hardly look at the web interface. And text files with templates/inheritance are way better for configuration than a UI anyway.
 
yeah
Munin is a monitoring tool for historical trending
(CPU load over time, etc)
 
oh i assumed that nagios would do that?
 
Nagios does monitoring and alerting (including alert histories)
 
@ircmaxell by "enemic frontend" do you mean the default black web ui?
 
@Nathan: yeah, the no-frills simple ui
This is what munin provides:
dam
 
8:28 PM
referer policing?
 
ohh okay got it
man that ios front-end is $12
 
Perhaps I'll make that a project... Build an interface that bridges munin and nagios into one display
 
If it is in .Net i can help :D shame
 
Nah, it's prob be in PHP...
 
8:35 PM
If your willing to put up with a noob i can try at that too :P
 
lol
 
I really must get some qualifications in REAL programming languages
 
:-P
+1 more till rep-cap is broken...
Well, today is the third time I have referenced the PHP source code to answer a SO question :-D
I don't know why, but doing that just feels good...
 
its like a RTFM solution
 
RTFSC
 
8:49 PM
we have some good Cacti stuff running too for the more performance-oriented questions.
Usually though in our case it's either "broken" or "working"
 
Yeah, Cacti == Munin in terms of most of their features
 
@MylesGray I think there is a REALBasic... maybe you can find REALJavaScript too.
 
Tom
is this not a vallid regExp to find all strings that end with a comma? var pattern = /,$/g;
 
@Tom in JS I don't think you can use the g at the end.
and actually it doesn't make sense in that case anyway
hmmm, Chrome at least doesn't mind the /g.
 
Tom
@Nathan does that not simply mean that it should return multiple matches?
 
9:03 PM
@Tom that's what it means, but how could there be more than one "comma at the end"?
 
Tom
@Nathan in any way, my regEx does not seem to return anything with the string "one,two,three"
@Nathan well at the end of the match
 
@Tom right, the end of that string is "e"
 
Tom
eg. that case should return [one] [two] [three]
 
You want split()...
 
Tom
@Nathan I guess that'd be easier, thanks
 
9:08 PM
@Nathan for my size of operation at the moment would you recommend shelling out for a VPS or just go ahead and self-host?
 
@MylesGray ... I would recommend whatever is cheapest in time and money. My coworkers and I have realized that running a server at home can actually cost a lot of electricity, and it certainly takes time.
VPS also seems like a time and money investment.
 
2
Q: How to find tag name in jQuery

Tom TuckerIs there a jQuery function that tells you the tag name of a given element? Say I have an element that represents a <tr>. What function do I need to call to get "tr"? I need this for debugging. Thanks.

 
pasting your thoughts into YouTube comments is probably the cheapest in the long run.
 
hahaha
 
needs +2 more to close out the jQuery tag for generalist :-D Perhaps this is the Q to do it since I was the first actual answer
My favorite response (10k users only):
 
9:20 PM
I'm not cool enough :'(
 
var tag = '<tr>';

tag = tag.substring(1,tag.length-1);

alert(tag);  // tag = 'tr'
as an answer to the above question
 
haha quality
 
yup
 
NICE
 
@Nathan was away earlier but yeah ad revenue is how I make my determination
seems kind of crazy to pay $200-300 monthly if Im not getting anything back, thats why I was on shared hosting before
 
9:34 PM
yeah, cool.
 
running a home server can suck too when it comes to isp costs, and uptime
mainly losing power and that sort of thing
 
hey btw my coworker "fixed" the physics in your JSLander... let me put it up at jsfiddle...
 
haha nice
yeah its a bit of a mess
i started to take major shortcuts just to finish it
 
nice
 
I have development ADD, I want to work on something quick and cool when it comes to personal projects.. so most never even come close to completion
 
9:37 PM
Is it silly to use cloud9ide?
Its a real cpu hog :)
 
@Raynos yes.
 
@Nathan actaully its just the browser it freezes a bit
 
cool ill check it out
 
I think if I use chrome for cloud9 and FF for browsing ill try it
 
heh, among many things I could use filltext now
rather than bitmap fonts
is that analytics code in the jsfiddle?
 
9:47 PM
@Loktar uh, I just pasted everything from my coworker's local copy.
 
ah ok, yeah must be analytics, was just confused for a min
 
I stupidly saw <script src="JSLander_files/ga.js" type="text/javascript"> and pasted its contents in too, but I guess it wasn't necessary
 
Thats cool of him to fix it, I dont mind posting that on the site
can I give attribution to him?
my maths = suck
 
I'll ask him. He's the smartest geek I've ever met.
 
I need to work with smarter people..
 
9:50 PM
that game is so addictive
 
lol think thats addictive try this js1k.com/2010-first/demo/755
wirehang clone
my kids even played that one like crazy
it has its quirks because it had to be under 1k, and I wasnt as awesome as the eye of the beholder guy
 
that one is more fun than the lander.
 
yeah lunar lander is too slow
 
umm
perpetual landing :P
i went outside the map
and it resets to the centre
and falls forever
 
lol its not supposed to do that
 
9:56 PM
nice
 
its supposed to just bring you out to the other side
ala pacman
 
nahh mine resets to centre of stage
ahh, its because the side i flew out on
was lower than the other side
 
weird the jsfiddle ones gravity and thrust seem to be lower.
 
interesting, too slow on FF 3.6
 
0
A: Trying to remove characters at the end of a string in three p elements using the same class

Nyuszika7HText nodes aren't considered as a child element. Use the innerHTML method instead. <p id='test'>Nice text in here</p> var $test = $('#test').get(0); $test.innerHTML = $test.innerHTML.slice(0, 10);

 
9:58 PM
original
it is crazy slow on ff..
 
@Loktar when I press the arrow keys, the page scrolls. can you fix that?
 
You can also use A/Z
Greg posted something awesome a few days back, now I cant find the link
really impressive canvas game thing
jsfiddle.net/ctrlfrk/hNaYu/30 This thing is friggin awesome. I need to make cool random stuff like it.
 
Oh yeah, the swimming sperms
 
yeah
 
10:04 PM
My javascript interpretator is going overmode to run cloud9ide so dont link heavy stuff like that :P
 
seeing stuff like that does nothing more than make me feel stupid :)
 
haha same @MylesGray
 
has a habit of going way past the rep-cap...
 
@MylesGray dont immitate @ircmaxell
 
@Raynos: what now?
 
10:07 PM
@Raynos you say that but I have had my QR Tag done for ages, just never uploaded it
 
@ircmaxell @MylesGray the images are too similar. Its confusing
 
Will change
 
Oh, new image? I'll refresh
oh lord
yeah, too bad... I had mine first (almost a year now I've had it)
 
fixed
 
yet another [your-doing-it-horribly-wrong] tag for this question:
0
Q: Can 2 singleton classes reference each other?

pmmmmWhy does this not work? Shouldn't each instance simply reference each other once? class foo { private static $instance; private function __construct() { $test = bar::get_instance(); } public static function get_instance() { if (empty(self::$instance)) { s...

(and that's not rep-whoring, since I'm already 100 rep past the cap for today)
 
10:11 PM
@MylesGray hanging out in this chat room usually makes me feel stupid.
3
 
@Nathan Hanging out in this chat / on stackoverflow usually makes me lose faith in humanity
 
@Nathan I went onto SE Jobs site, suddenly I feel like i should work in Mac Donalds
 
@ircmaxell really? I'm generally impressed with the quality of most SO people, and I mean the conversations here usually make me feel ignorant about JS...
 
@Nathan: the questions moreso than the answers...
 
@ircmaxell true.
 
10:14 PM
there are a lot of smart people around these parts
 
@Nathan @ircmaxell most of the people here are good.
I mean some of the questions are fail
 
@Raynos: I know, I was saying it for the effect...
 
but If you partition people into regulars and newcomers
the regulars are good
 
most of them are
not all
but most
 
i pity the noobs.
 
10:15 PM
:D
 
^ case in point
 
I got a little turned off by the PHP crowd on this one.
-7
A: How to increase my "advanced" knowledge of PHP further? (quickly)

Nathan"my own library of functions" == "a [idiosyncratic and probably sucky] framework". I recommend learning Symfony because the developers seem to consistently strive to do everything according to "best" practices ... but you could probably learn a lot from any of the popular frameworks. Don't ...

I may not have been tactful enough but I think my point was valid
 
But php attracts "noobs" >_>
 
honestly @Nathan, I agree with the -1
 
@ircmaxell yeah you like to roll your own.
 
10:17 PM
9
A: Are Symphony and CakePHP too slow to be usable?

ircmaxellThe problem with benchmarks, is that they normally don't lend themselves to the real world. Write a real application, and you'll see that all the frameworks are within about an order of magnitude of each other when it comes to speed. And they are all slower than if you didn't use a framework (a...

No. That's not why
read that for the answer to why.
 
my point was, I learned a lot more about "advanced" PHP once I started using Symfony. Doing it myself...
 
@Nathan why did you do that :p
 
Well, that's fair. But I can't stand the mentality that developers should "just use" a framework without understanding how it works or why it does what it does
If you take the time to really understand it, they are great
and one of the best ways to understand IMHO is to build your own. I wouldn't suggest the average person building their own for production apps, but for an academic lesson it's a great learning experience...
That's my view point at least...
 
That OP was totally thinking he was awesome for building his own, and like "what should I do next?".
 
@ircmaxell ew. No thanks I dont want to build a cross-browser compliant browser wrappper like jquery
 
10:21 PM
@Nathan: that's a very valid point. In context it may have been a good thing to say
Oh, and there's a huge difference between a set of libraries and a framework (even though a lot of people use them interchangeably)...
 
I mean it's great and all but I don't want to deal with that low level nonsense.
 
@Raynos: do you understand how to, and could you if you had to?
 
@ircmaxell yes at a loss of 500% efficiency
Although I have still yet to get round to learning how to do ajax manually. its on the todo list.
 
@Raynos: that's fine, but you then understand the framework you're using.
But a large number of people out there don't understand it, but still use it.
 
@ircmaxell I agree though. and went and read all of underscore.js before I started using it. It's just not always the case
 
10:23 PM
If you don't know your tools inside and out, how can you hope to be good at using them?
 
@ircmaxell theres a difference between understanding and making a cclone yourself
 
@Raynos: making a clone is sometimes the best way to understand
 
in some cases making a clone is good in others its just painful
 
@ircmaxell OP: "My current structure is a mix between WordPress, Kohana and my own knowledge."
 
Oh god
oh god. structure and wordpress used in the same sentence? head...exploding...get...sponge...
@Nathan: you talked me into it
I'd +1 if I could in context... (meaning out of context I disagree with the sentiment, but in the context it's good advice)
 
10:25 PM
doesn't matter...
just the reaction from the crowd was a bit disappointing.
 
fair enough
 
At least this dude stood up for me.
> @Richard JP Le Guen: a key point in becoming a good developer and not just beeing some geek in love with programming is being able to learn out in the field, while creating apps that are meant for deployment, and not staying in the cellar hacking together whatever you think will be the one framework to rule them all. because you can't. software is imperfect and you can only become good, if you accept that fact and make the best of it instead of playing around. – back2dos Jun 8 '10 at 16:35
 
fair enough.
 
But I'm not bitter.
 
that's good
We all have our beliefs that go against common threads.
I think that all notices are errors. doing $foo = $_GET['foo']; is bad practice
 
10:36 PM
mornin @david
 
morning all
 
mornin
 
@ircmaxell why?
 
why? Let's see. First off, it assumes that the variable is set (which is bad imho)
second, it doesn't account for a few things such as magic_quotes being on/off, input character set (which is a concern now adays)
 
alert('hi everybody');
 
10:39 PM
third, input should be abstracted so that you can switch mechanisms on the fly and not have to rewrite your code (this one is a little bit of a fetch)
 
@ircmaxell PHP in the JavaScript chatroom?
 
setTimeout('alert("hi @JohnFx");', 300);
 
@JohnFx warning: implied global at line 1, character 1: alert
but hello :D
 
@Nyuszika7H: nobody's talking JS in here (well wasn't until now), so why not? It's about general programming paradigms tho, not just PHP...
 
nevermind
 
10:41 PM
lol
@JohnFx: feel free to ask/talk, we're just bantering/goofing around
 
Constructing a web-based multiplayer game in JS - is that a bad idea? E.g. a cardgame or a scrubble game. Isn't it to easy to write a "bot" for it? Maybe I should consider Flash instead, just because it's "binary"?
 
$.ready(function() { alert('welcome to chat JohnFX');})
 
It's also an issue that applies to javascript though, most people learn javascript by going nuts and coding, copy pasting from whatever google shows up. And when you tell them w3schools is bad, they get angry and downvote you :(
 
@Jonas: the wireline traffic is going over HTTP anyway, so it would be trivial for anyone to deconstruct what's going on and write a bot anyway...
 
or something like that.
not trying to write a bot, Just trying to speak the native language of the chat room.
 
10:45 PM
@ircmaxell true, but I think it is much easier, but maybe I'm wrong... I would prefer to use js instead of flash and java applets...
 
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
 
@Jonas JS is the future. Flash is the past. Silverlight...
 
Silverlight... is the tuesday after next?
 
!!!!!!!!!!!!!!	!!!       !!!	!!!!!!!!!!!!!!
!!!        !!!	!!!       !!!	!!!        !!!
!!!        !!!	!!!       !!!	!!!        !!!
!!!        !!!	!!!       !!!	!!!        !!!
!!!!!!!!!!!!!!	!!!!!!!!!!!!!	!!!!!!!!!!!!!!
!!!				!!!       !!!	!!!
!!!				!!!       !!!	!!!
!!!				!!!       !!!	!!!
!!!				!!!       !!!	!!!
 
@Jonas: it may be "easier", but I wouldn't say much. Anyone who knows what they are doing will be able to do it
 
10:46 PM
@JohnFx Silverlight is the strange dream you wake up from and think "did I really dream that?"
 
Hmm, I guess why it's broken.
 
you could build some adaptive huristic metrics to detect bots from usage patterns
 
I am still trying to figure out exactly what problem silverlight solves.
 
@Nathan I agree... I am just don't want bots destroying my games :( Maybe I should consider other techniques to test if the players are humans...
 
@JohnFx "we didn't write Flash"
 
10:47 PM
I am still trying to figure out exactly what problem silverlight solves.
 
silverlight is the past, in the future. It's like if you see someone on the road driving a horse drawn cart
 
@JohnFx: the rest of the world is too
 
@Jonas I considered occasionally chucking a captcha in
 
@ircmaxell sounds good, but complex and a lot work I guess... I would like to have a library for that...
 
a while back there was an MMO drawing webpage, and to get like ~10 pixels of paint you needed to solve a quick Euler walk problem
 
10:50 PM
@Jonas: fair enough, but if you're concerned about it...
 
@david yes I could do that, but it may be annoying for the player... Maybe I can just estimate how fast the player answers.. if it is a simple bot, it probably answers very quickly.
 
earlier = ear lier = an ear that lies! :P
 
Anyway, JS seem to be a reasonable solution, there are other weapons against bots than using binary traffic.
 
hehehe
interesting question:
4
Q: Is there an advanced CSS minifier/compiler that does things like strip redundancy and comma separate identical rules?

George BaileyFor example input{margin:0}body{margin:0;background:white} would be shorter written like this input,body{margin:0}body{background:white} or this input,body{margin:0}body{margin:0;padding:0} would be shorter written like this input,body{margin:0}body{padding:0}

invented a word there: minification.
 
10:57 PM
@ircmaxell So, what would you do instead of $foo = $_GET['foo']? var won't work…
It only works inside classes, and it was deprecated in PHP 5.3.
31
A: What does PHP keyword 'var' do?

karim79It's for declaring class member variables in PHP4, and is no longer needed. It will work in PHP5, but will raise an E_STRICT warning in PHP5 up to version 5.3, as of which it has been deprecated. Example usage: class foo { var $x = 'y'; function bar() { } }

 
huh?
first I would use an input class to sanitize the input properly (well, at least abstract away magic_quotes and charset mangling)
 
@ircmaxell huh?
yep, I know, htmlspecialchars()
 
second, instead, $foo = isset($_GET['foo']) ? $_GET['foo'] : null; would work better...
No, not htmlspecialcars...
Read this:
4
A: PHP Security - Sanitize & Clean

ircmaxellAlways remember, Filter In, Escape Out for all user supplied (or untrusted) input. When reading user supplied data, filter it to known values. DO NOT BLACKLIST! Always always always always whitelist what you are expecting to get. If you're expecting a hex number, validate it with a regex like...

And this:
5
A: Is "filter input, escape output" still valid with PDO

ircmaxellYes, it is still valid. Filtering is not about preventing security vulnerabilities, it's about not populating your database with garbage. If you're expecting a date, make sure it at least looks like a date prior to storing it. Escaping output is about preventing security vulnerabilities (nam...

 
@ircmaxell both outputs the same thing (nothing)
 
hi
very basic question: if rss response
<item>blablabla</item><item>blablabla</item><item>blablabla</item><item>blablabla</item><item>blablabla</item><item>blablabla</item><item>blablabla</item><item>blablabla</item><item>blablabla</item><item>blablabla</item><item>blablabla</item><item>blablabla</item>

i want regex for scan first five.
i am trying it as (<item>.*<\/item>){5} but i got just one item
 
11:03 PM
@UsmanAli .* this is the problematic part
good night :)
 
@Loktar my coworker says, sure, anything you want. His name is Ben Livengood if you want to credit him.
 
@Nyuszika7H: one has an unpredictable code-flow based upon a global condition, and the other does not. It's a fine difference, but it's a difference
 
night guys
 
good night
 
any has grip on regex syntax
 
11:05 PM
I find it odd that I keep referencing old answers of mine more and more lately. Instead of retyping the thoughts, I'm recycling...
!kitten regex
 
@ircmaxell no kitten :(
 
@UsmanAli:
4322
A: RegEx match open tags except XHTML self-contained tags

bobinceYou can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that can be used to correctly parse HTML. As I have answered in HTML-and-regex questions here so many times before, the use of regex will not allow you to consume HTML. Regular expressions are a tool th...

 
@ircmaxell OMG is this a dream? 4322 upvotes?
 
it's reality
 
4324 now...
 
11:09 PM
hmm i can't parse :(
but i will do, i have to do other wise need to pay more for server
 
It's the second most upvoted answer of all time
sorry
most upvoted. The second most is
whoops, deleted question
1455
A: Strangest language feature

Edan MaorIn C, arrays can be indexed like so: a[10] which is very common. However, the lesser known form (which really does work!) is: 10[a] which means the same as the above.

Ok, off to home
take it easy and good night...
 
Tom
11:33 PM
is this really the best way to get a timestamp since epoch? new Date().getTime()
creating a new data object seems unnecessary
ah Date.now() of course
 
@Tom yes use that.
 

« first day (111 days earlier)      last day (4838 days later) »