« first day (139 days earlier)      last day (4827 days later) » 

7:00 PM
@ircmaxell no problem man, If you want hit me up with a spec, i can do it for free too, as long as you don't keep changing your mind (like some of my clients, they drive me nuts) :D
 
Well, I'd provide at least a referral and a nice blog post about it :-D
 
@CRoss Check out superfish.
 
Awesome sounds good to me :D
 
... @Cross left without an answer :(
 
@Nathan I like suckerfish > superfish
 
7:03 PM
mkay
 
What templating engines are you good with? WP? Drupal? J? Anything else other than smarty?
 
@Nathan oops, wrong way round
your right, superfish > suckerfish
@ircmaxell I have dabbled with J (very experimental) but I'm really good with WP
Have also looked into doctrine and igniter too
 
Cool,
Doctrine is a DBAL, not a templating system :-P
I hate smarty with a passion...
 
@ircmaxell I know but it is somewhat of a templating system
 
wow ircmaxell.com is nothing I would look around at unless I already knew you.
 
7:05 PM
@ircmaxell never even heard of smarty... good thing?
:)
 
Oh, and if this works well, I'll have a paying gig for you as well (I have a commercial site that I need to rewrite)
 
@ircmaxell cool sounds good :)
 
I hate templating systems
 
@Nathan Not arguing. It sucks. I did it 4+ years ago...
 
@ircmaxell as your one of the honchos at J, do you want it done in J?
 
7:06 PM
@MylesGray Assuming you';re not sarcastic, smarty is an abomination
@MylesGray I was one. But no, it's not suitable for the projects at hand
 
@ircmaxell next time go old school like my ancient 1997 page. It'll last longer.
 
@ircmaxell no sarcasm at all... honestly never heard of it
 
the commercial one will be a custom built site. The performance needs are just too high...
 
@ircmaxell cool cool
@Nathan man... I just went blind :D
 
tgah my old page is soooo out of date but at least it has that vintage look
 
7:08 PM
lol
 
lol
 
    // Some people use parseInt instead of Math.floor.  This
    // optimization makes parseInt on a Smi 12 times faster (60ns
    // vs 800ns).  The following optimization makes parseInt on a
    // non-Smi number 9 times faster (230ns vs 2070ns).  Together
   // they make parseInt on a string 1.4% slower (274ns vs 270ns).
 
@Nathan hahaha epic "<sarcasm>"
Im off to t'gym all see ya in a bit :)
 
Heh no doctype or anything :D
 
@Nathan doctype? whats that? ;)
 
7:09 PM
@MylesGray something them newfangled kids invented
 
lol
 
<hr> Man i forgot about those... Im gonna bring back <hr> and <blink>
and if you're lucky... <marquee>
 
whatever, <hr> is classic. totally different from <blink> and '<marquee>'
 
Who doesn't want to see "Subscrbe Now!" bouncing from side to side on a page in red letters on a yellow background... ahhh the 90's
 
yup. <hr> is still somewhat valid (although it is not structural, so it's existence is flawed in modern times)
 
7:12 PM
you can style them... and they're more semantic than e.g. <div class="user-container user-571593 monologue catchup-marker catchup-marker-2">...
 
hey thats my user number! 571593 that makes it semantic :D
 
@CRoss came back!
 
indeed
 
lol
 
superfish?
 
7:13 PM
anyhoo off for a while ciao all :)
 
yes Myles says it's better than suckerfish
 
Take it easy
 
No, @MylesGray take it sweaty!
 
Bloody sugar sucker fish in my dish, how many pieces do you wish
 
@Nathan thats the plan :D, Time to get pinned under an 80Kg barbell :D
bloody bench press >.>
 
7:15 PM
hrm, I wonder:
[tag:blood-sugar-sucker-fish-in-my-dish], [tag:how-many-pieces-do-you-wish]. [tag:where-i-keep-it-on-the-soulside]
dam length requirements...
[tag:!kitten-say-hi]
Dam, ! is an invalid tag character
 
I was really surprised jQuery UI doesn't have a menu tool in it
 
sucks
Woo Hoo! Only one more till I get 20 answers >= +10!
 
that's pretty impressive
 
user492203
Hi again! :)
 
user492203
!kitten down? google.com
 
7:21 PM
ircmaxell, New Jersey, USA
23.1k 2 16 52
What's sad is that I have FAR fewer security answers than mysql answers (about 1/4 as many) but have 60% of the upvotes...
 
user492203
 
I just pushed you over the edge
 
user492203
@ircmaxell How can I get those fancy badges for tags?
 
Woo Hoo!
Nice! Thanks @Greg
@Nyuszika7H So for the JS bronze badge, you need 88 more upvotes in the tag
 
@CRoss yeah I was surprised by that too
 
user492203
7:28 PM
where can I see how many posts I edited?
 
You can't directly
^^ but it's almost 30 days old
 
@Nathan playing with suckerfish, but it doesn't seem to support nesting
 
@CRoss Myles said superfish is better
 
@ircmaxell I've been playing with lighty and can't figure out how output javascript files with gzip compression
 
I've only used superfish and it does nested megadropdowns like all the cool kids are using
 
7:33 PM
@Greg: sec
 
*a*
*a.1* -> a.1.a
a.2 a.1.b
a.3 a.1.c
 
@ircmaxell I'm not blindly asking you btw, just haven't had much luck
 
Fair enough
 
compress.filetype has "text/javascript" and application/x-javascript and the cache dir is writable by www-data
but Google Chrome audit is still recommending to use gzip compression
 
7:37 PM
compress.allowed-encodings = ("bzip2", "gzip", "deflate")
And make sure your mimetype assignment has ` ".js" => "text/javascript",`
 
@ircmaxell ahhh I think that line has done it, cheers
I assumed that mod_compress would automatically allow gzip
 
:-D
 
@ircmaxell "We currently limit to compression support to static files." My php application "builds" the html and saves it as a physical file until its changed (kind of pre-caching if that's the right terminoligy)
@ircmaxell gzip is working when serving these cached .html files, but certain pages are not saved to this directory because they have to be dynamically built each request, so g-zipping them is impossible?
 
That would be compressed for you
Which ones? The dynamic ones?
 
yeah the dynamic ones
 
7:49 PM
If so, you'd have to do that in PHP
 
hmm, that never crossed my mind
 
hehehe :-D
 
the output buffer can be gzipped with standard php functions?
 
yup
ob_start('ob_gzhandler');
that'll do it for you automatically
 
wow, nice one
 
user492203
7:53 PM
Any ideas why event.which === 45 (hyphen) doesn't work with keyup/keydown but works with keypress?
 
the spec is weird, that's why
 
user492203
:/
 
user492203
Ah, got it. keypress returns the charCode (even when using event.keyCode ! ) but keyup + keydown returns the keyCode.
 
user492203
So 189 is the correct key code.
 
8:09 PM
@ircmaxell if I do this in php, what will old browsers do that can't support gzip?
 
ob_gzhandler() is smart enough to detect that
 
great
 
I'll assume @Raynos saw the "sharing JavaScript Code Between Client and Server" article in JavaScript Weekly...
looks like yet another require implementation
 
user492203
Anyone knows why does this JavaScript packer uses eval if I check base62 encode?
 
user492203
eval(function(p,a,c,k,e,r) { <-- Huh?
 
user492203
8:16 PM
never knew eval accepts a function, though using an anonymous wrapper would be sorter
 
the packer function returns a string
 
I wonder what if you passed 'f', 'u', 'd', 'g', 'e', ' ' as the arguments to that function...
 
or (r,e,k,c,a,p)
 
user492203
> eval(function(r,e,k,c,a,p){e=String;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('0(\'1, 2!\');',3,3,'alert|Hello|world'.split('|'),0,{}))
TypeError: Object #<Object> has no method 'replace'
 
sad :(
 
user492203
8:27 PM
0
A: use jQuery to move the cursor to another field when a certain character is typed?

Nyuszika7HHTML <form> <input type='text' class='num' /> <input type='text' class='num' /> </form> JavaScript $('.num:first').keydown(function (event) { // check for hyphen if (event.which === 189) { event.preventDefault(); $(this).next('.num').foc...

 
user492203
And with f,u,d,g,e I get c is not defined
 
No, passing it as the values of the arguments
 
user492203
@ircmaxell ah, then it results in nothing (undefined)
 
there you go
 
user492203
How do I replace A with B and B with A? So ABAABB would become BABBAA. Replacing A with C, B with A and C with B wouldn't work, because there may be anything else in the string, even C.
 
8:31 PM
Well, first replace A with a null byte \0, then B with A, then \0 with B
 
user492203
Though it's very unlikely to happen, but this fails if I have another null byte in my string…
 
user492203
8:44 PM
hmm I need to pass a function:
 
user492203
function invertChars(str, c1, c2) {
    return str.replace(RegExp(c1 + '|' + c2, 'g'), function(m) {
        return (m === c1) ? c2 : c1;
    });
}
 
anyone have experience with jQuery UI resizable?
 
user492203
@CRoss only with resizable dialogs
 
is a jquery ui theme required for this to work?
 
user492203
@CRoss No, but you may not see the handle without a theme...
 
8:55 PM
interesting
 
allo all
 
user492203
 
user492203
lolololololol
 
user492203
> erection reset by peer
 
user492203
freenode IRC, ##javascript
 
user492203
9:01 PM
Oh, and I realized that reset by beer not peer :P
 
@ircmaxell if I use ob_start('ob_gzhandler'); then my browser shows the error ERR_CONTENT_DECODING_FAILED
any ideas?
 
user492203

PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
 
Are you double-encoding the data?
 
(I'll go to the PHP room, forgot I was still in JavaScript)
 
ok, jquery ui again
need two divs, where a.width + b.width = screen.width, and the border is resizable
 
user492203
9:06 PM
night :)
 
Quick question, don't think it merits a whole SO question. I'm looking through the docs for underscore.js (see documentcloud.github.com/underscore ), and it keeps talking about passing a "context" as a parameter to higher-order function. What's a "context" in this - erm - context...
 
@ircmaxell why would anyone use lighthttp over apache?
 
Hi all, i want to add a div to this code

$('#outputdiv').text().split("");

do I do it like this; ('#outputdiv' + '#outputdiv2') ?
 
don't quite think that will work ...
try ($('#outputdiv').text() + $('#outputdiv2').text()).split("");
 
@CRoss I see :) thank you but if you have to add a lot of div's what would be more efficient then?
 
9:22 PM
... thinks
 
@MylesGray: it's far more efficient
 
@ircmaxell Why is that? Is it not as modularised?
 
it's event driven, and doesn't take the kitchen-sink approach
not to mention the fact that it doesn't support the performance hogging .htaccess files
 
@ircmaxell your not a fan of .htaccess?
 
0
Q: Resizable split screen divs using jquery UI

C. RossI have a design in mind that involves a split panel view in html, similar to a winforms split panel. I've been expirimenting with jQuery UI - Resizable and I like the function, I just can't seem to co-ordinate the resizing of the two divs. The problem with the current code is that the two divs ...

 
9:24 PM
How else do you do page name rewrites?
 
In the server config
.htaccess is nice, but it's an absolute abomination in terms of performance
 
@ircmaxell that requires you to have root access, what if there are multiple domains running on the one server?
like for Shared hosting etc
mind you.. if you are using shared hosting then you dont really need the performance :P
 
Exactly
it's not good for shared hosting. But it's GREAT for sites that need the speed
 
really need some quick help on a weird jquery plugin bug--anyone here familiar with colorbox?
 
nope
 
9:31 PM
@ircmaxell Does anything need to be coded differently for lighthttp?
e.g. in my blog post here:
 
A slight bit on url rewrites is different
 
I have this:
if ($_SERVER['HTTP_X_FORWARD_FOR']) {
        $ip = $_SERVER['HTTP_X_FORWARD_FOR'];
} else {
        $ip = $_SERVER['REMOTE_ADDR'];
}
 
That's normal
 
Does it have all that niceness?
 
@CRoss thank you for your help works fine for now! :) Byebey
 
9:32 PM
BUT, I can hack your server if you do that like that...
 
you can? :O
cause im accessing the $_Server global?
 
No
cause you're blindly trusting HTTP_X_FORWARD_FOR
 
I dont understand?
You can inject a fake IP?
 
yup
 
ahh got it :)
 
9:39 PM
Sounds trivial, but I have breached a few sites that way :-D
 
@ircmaxell teach me master teach me :D
Haxxor my blog
 
Nah, I haxxored another popular site :-D
 
Dare i ask?
i know! WP.org!
or Drupal
:P
 
nope
and I won't say, but it's something you've used before
 
I bet your gravatar is the link ...
 
9:46 PM
@CRoss no it's help im trapped in a barcode factory!
@ircmaxell Me because of what I do?
 
Huh?
No, I won't say since I'm not going to imply anything against the developers of said site...
 
Okay okay cool :)
 
@MylesGray sigh
 
@CRoss seriously... it is :P
 
double sigh
 
9:50 PM
@MylesGray I know, I saw your response after I hunted down an online decoder ...
 
@CRoss: get a smart-phone :-P
 
@CRoss what @ircmaxell said :D
@ircmaxell what did you do at the big J?
 
why do I need one?
later y'all
 
later man
 
@MylesGray: I was a lead developer (We called it Developer Coordinator since we wanted to get away from the image of a lead). I also headed the maintenance team and the security team...
 
9:53 PM
Oh wow nice :)
How did you get into that?
 
JoomlaPerformance.com... I raised some eyebrows with that, and then was recruited in
spent some time as a team lead on the maintenance team under one of the other coordinators
then was invited into the core and into the role of DC myself. Then I took over maintenance and security
is good at debugging... Unusually good...
 
Haha you are at one with the machine
 
lol
 
@ircmaxell what made you leave and at what version?
 
I'm not going to talk about that. Suffice it to say it was a difference of opinion...
My last release was 1.5.11
 
10:01 PM
@ircmaxell understood, just a fall out within the team, Still you are bound to be happy with the legacy you left?
 
isn't going to comment on that. I've stayed away from the project, so not really sure what's been going on, so I can't say I'm happy or sad with the external perception of the project...
 
Ill leave it at that...
On the HTTP_X_FORWARD_FOR found this...
 
Yeah, that's one
 
Cool, very clever
 
Not the one I was looking for. But one
 
10:07 PM
It involves some kind of SQL injection anyway?oh dear jesus.. my hosting is JUST like that
:(
I'll try and hack myself.. if I can do it im moving
I get the default Apache/Plesk page if i enter my shared hosting IP
 
No.
 
no?
 
Mine doesn't require anything but a getIp() style function, and a hard-coded IP based debug system...
 
Oops disregard the SQL injectiong
 
which are surprisingly around quite a bit...
If you want me to audit your code, I can do that. I'm going to be offering that as a freelance service soon anyway (since I apparently have a knack for it)...
 
10:10 PM
@ircmaxell Well im WP based so most of it is out of my control... But I'd love to see how you could get into my site
By hard-coded IP debugger you mean something like this?
 
hehehe
 
@ircmaxell I don't mean... I'd love it as a challenge, I more than believe you could do it but it really interests me how people find loopholes in systems like that
 
Fair enough
 
@ircmaxell so Symfony is your new project?
 
10:15 PM
just go round finding security problems for fun?
 
Yup :-D
4 based upon SO posts alone so far (in major projects/frameworks)
 
Wow... that's impressive
like REALLY impressive
 
hence why I'm considering doing security consulting
 
@ircmaxell do you have the contacts to go freelance?
 
I'm not sure... Whence the consideration ;-)
 
10:24 PM
Ah, there we are :P
 
I do have some contacts. And I do have somewhat of a name for myself, but not famous in that context by a long shot
 
All my jobs have been through association no one has come to me independently so far, i just need to build a brand more...
Its only really a job while im at uni
 
I've had plenty of direct job offers from my stint with J
not so many anymore, but when I first left, multiple per week...
 
Hopefully based on where i get my placement I can get a job there :)
 
nice
 
10:27 PM
I keep googling for people working at Google Ireland so that I can strike up a convo and maybe get them to forward on my CV to HR
:P
I hate the online applying thing they have
 
Nice.
Google is tough to get into. Very tough
 
Yeah I know :(
 
user1385191
yeah, you're being extremely ambitious at this point
 
But I have only applied for web design intern
So I just need to build my portfolio
 
user1385191
just get a job at some startup where you can hone your skills
 
10:28 PM
yeah, for an internship, go for it!
Actually, I should try applying for a job at Google... I doubt I'd get it, but still
 
@ircmaxell you would easy!
 
Eih...
 
Once I build some sites for brands, then ill besorted
If I get an interview I'll be happy I come across much better in person than on paper
 
hehehe
 
I mean web design is a passion of mine i spend all my free time doing it
But I dont often do it commercially :(
I spend WAYYY too much time on my own site
 
10:32 PM
fair enough. I know if you're good, you can make bank on a design project
I have a friend who designs high end one-off J themes, and he's bringing in like $20k to $30k each...
 
make bank?
 
make bank ~= make serious money
 
$30K each year?
 
no, each project
 
NO WAY!
whatttttt
 
10:35 PM
He's good. Very good. And he only takes on clients he believes in, so he pours his heart into each one. A typical project can take him weeks or even months...
 
Yeah same here... except "You're a student right? That means your cheap..." I spend WAYYY too much time for way too little money
 
Don't admit that you're a student. Just say Judge me by the quality of my work
 
Like I charged £200 for that theabsoluteconcept.com site I did, took about 2-3 weeks to do and the guy KEPT CHANGIN HIS MIND arrrghhhhh
 
Shoulda got like $2k - $5k for that...
 
I designed the entire theabsoluteconcept.com/e-store page in CSS3
it looked IMMENSE
then know what he says?
 
10:37 PM
@MylesGray next time, get 50% up front, and get the client to literally sign off on the mockup
 
oh no
 
It looks sh1t just do in in PS then just put .jpg's up
 
lol
 
you know why it looked shit?
he was on IE6
 
LOL!
 
10:38 PM
it looked like the back end of a dead badger
I swear I said "upgrade to FF3.6"
 
Dam, +15 more till rep-cap
goes hunting for new questions
 
"WOW that looks great!... but still redo it, what if customers use IE6 on the site"
 
well, it's a fair point
 
the demographics showed he was the only one on IE6 >.>
I gave him GA access to prove it too.. wasnt having any of it
I mean for £200 I should have done the menu bar
 
Live and learn. There are tons of horror storries like that out there
 
10:40 PM
yeah that site from earlier should be enough to show he was in the bottom 3% :D
 
@Nathan I have established a 25% up front 25% half way and 50% on completion
and Sign off a spec
 
oh no someboy starred my link to my old home page!
so embarassed
 
I have learned
@Nathan embarrassing? that thing is beautiful, I wish I could be as x-browser as that
 
yeah and it might be worth a "no compromise for IE6" in the contract
hahah, it was a big deal to me to preserve Netscape 2.0 compatibility so I didn't use frames or tables on that design :D
 
@Nathan good.. id have to kill you
 
10:43 PM
LOL
 
I'm pretty pleased that html5 makes my old markup pretty legitimate again. The strict xhtml days were rough, but I stuck to my principles.
 
@Nathan I love XHTML
self closing tags = <3
not less than 3 >.>
 
I think they're deprecating background etc in the <body>
 
@Nathan that was gone long ago?
You have to use body{background:url();} for that?
 
nice
 
user1385191
10:55 PM
ways thinking in js benefits my work in another language: I'm planning to use this as the data structure for a project: obj > prop > array > obj > prop, prop > array
 
Hrm, +5 more (or more) and I can go home for today...
 
@ircmaxell Done :)
Go home! be free!
 
Woo Hoo!
I can leave now
Thanks! Gnight!
 
Night @ircmaxell
Gone all 80's atm...
What a tune
 

« first day (139 days earlier)      last day (4827 days later) »