| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
Comments:
<0> chroot apache this night <1> Tonight, tonight. <1> Save tonight, fight the break of dawn! <2> jpeg: they wont be able to run any of it; like i already said, i can control resource usage. that includes control over processes. <3> or you can just go to #postgresql. There's a bunch of dorks there discussing magic incantations that prevent exploits <3> like the one guy chmods wget and perl 700, therefore he is immune to attacks <4> ew73: Eagle Eye Cherry. What a bizarre name. That's actually his name. <2> oh, hey; here's an idea <1> perl's power is greatest at the full moon. You must go, skyclad, into the field, and dance the dance of -T, and you will see the error of your ways. <2> can a perl script change the uid/gid of the current apache child? <5> that ****in retarded. <2> i mean, a mod_perl script <1> hobbs: The 90s were a strange, strange time. <5> for hours of fun and entertainment, go to larp.org <6> rutski89: only if it is running as root <2> pravus: that's doable.
<2> that's my solution then! :D <7> ok what did larp.org do? <7> it's a completely empty page <5> hmm <5> well, it used to be a place for people who are into Live Action Role Playing. <4> ew73: I heard that song in the 90s, forgot about it, and then I downloaded this video game remix tune from the internet, and something bugged me about it <5> I guess they finally got kicked out of their parents basement <7> irc is enough live action role playing for me <5> the pictures were the best part <5> and sometimes you get video! <4> ew73: and then I realized that there was this section that (intentionally or not) perfectly paralleled the chords to Save Tonight <2> Have each apache child serve only one request, then die. at the beginning of serving the request a mod_perl hook changes the uid/gid to match the vhost that was requested. hence any mod_perl stuff that's executed later will subject to the restrictions put upon that user; and one of those restrictions can be the lack of access to system files! :) <4> ew73: except for about a week it was just "that song, dum de dum dum de, um, da da dum, dum de dum dum dum" <1> hobbs: Dork. :) <4> ew73: and then all of a sudden it popped into my head ;) <8> Eagle Eye Cherry is related to Neneh Cherry who sang "Buffalo Stance" <8> just fyi <8> ;) <5> Lets say I download lots of web pages with LWP. Can someone tell me a good way to download all these files into one compressed file without first downloading each page into a directory first? <9> jrsims: A) why? B) most compressors can easily add in memory files to an archive <5> ..oh, I need to be able to extract files as needed from that compressed file. <9> um, so? <5> buu: I have a project where I need to update my web archive frequently with new pages, and I want that archive to be immediately portable. <9> So put them in a zip file. <5> but I need perl to read/write from that file almost like I would a directory. Is that possible? <1> eval: 3.59*12 <0> ew73: 43.08 <9> buubot: restart <9> fifty window messages later <5> basically, I'd like to read/write to an archive file on the fly and use the fastest possible compression/uncompression method. <5> and I don't know benchmarks. <9> So um, do it <5> so I'm looking for advice <5> ****. <9> buubot: die <10> uncompressed is the fastest compression/uncompression method. <9> hrm <11> Botje: not sure if you're still here, but thanks for the info regarding closures. I learned something new. And it was exactly what I needed. <9> eval: 32 <4> freeone3000: the ratio ****s though ;) <0> buu: 32 <9> HE LIVES <10> Er. Is .tar.b'ing it on copy an option? <10> *.tar.bz2ing. <9> freeone3000: Not really. <12> hi buu <9> NOZKOZF <13> i use recursion for matching nested parentheses: "$re = qr{\( (?: (?>[^()]+) | (?p{$re}) )* \)}x;" now i need to use recursion the other way around, that is, any character BUT parenthesis should act as a parenthesis <13> for instance, i want to replace "use only recursion" with "u(s(e( (o(n(l(y( ()r)e)c)u)r)s)i)o)n". to keep it simpler, the source text includes *no* parentheses. <9> I'm sorry <14> ok i need to create a code that cycles through a file, and checks an argument to see if it compares to a line in the file, and returns true if it does ... how to do that? <15> use grep? <16> grep 'foo' file <16> yeah, stuuf knows the score! <14> from within perl? <17> `grep 'foo' file` ;) <15> `grep foo file <15> ` <17> i win! <14> oo... ok.. i am more of a php guy... but i have to manage this perl site... movable type actually <14> thanks guys
<15> open <IN>, $file; grep {/foo/} <IN>; <14> whts <IN> again? <15> a filehandle <15> open IN, $file; grep {/foo/} <IN>; <15> first one shouldn't have <> <15> <IN> reads a line (or all lines) from a file <14> ok i have to read up how perl opens/closes files before i ask anymore dumb questions <15> perldoc perlopentut <0> Type 'perldoc perlopentut' in your shell or go to http://perldoc.perl.org/perlopentut.html <17> open IN, "filename"; return grep {/foo/} <IN> ? 1 : 0; <17> wow that was a pointless use of return ... ? 1 : 0 <15> not totally pointless <14> hmm hang on let me put together something really quick and see if i can get this to work <15> say you want your caller to know if something was true but not how true it was <15> in this case it doesn't matter, but it could somewhere <18> 0 | !!grep /foo/, <IN> <14> open INFO, "< datafile" or die "can't open datafile: $!"; <14> ok this opens "datafile" and ***igns it INFO handle <14> right? <15> it's better to do open INFO, '<', $datafile <14> < for input i am ***uming? <15> yes, just like in a shell <14> 0 | !!grep /foo/, <IN> <14> wht is that? <4> haha <14> thts why i think perl is hard for php guys atleast.. i asked a ques and i get 10 ways to do the same thing <15> exactly! <4> kunjan: why is that bad? :) <14> because it confuses me.! <14> lol <15> there are thinngs that perl can do 10 different ways but that php can't do at all <14> yeah i agree <14> open BANLIST,'<', 'ban.list' or die "can't open datafile: $!"; <14> ok now i need to grep this <15> grep /foo/ <BANLIST> <14> for an arg say $arg <14> ok <14> can i write grep /$name/ <BANLIST> <15> that reads all remaining lines from the file and p***es them to grep <14> ? <18> grep /foo/, <BANLIST> <15> yes <18> comma needed <14> oo ok <15> comma if you're doing a regex, but not if you use a sub, right? <14> sub as in function right? <18> grep //, or grep { // } <15> yeah, you can do stuff other than just regexps <14> lets avoid regexp for now please? <14> lol <18> grep $_ eq $foo, @list also works <14> i need to compare entire line to $name <14> one entry per line <17> what tybalt89 just said is what you need <15> eq is the string equality operator <15> never make the mistake of comparing strings with == <18> remember the \n <14> 0 | !!grep /foo/, <IN> ok this.. it returns 1 if <in> has it? 0 otherwise? <15> couldn't you chomp them? <13> i use recursion for matching nested parentheses: "$re = qr{\( (?: (?>[^()]+) | (?p{$re}) )* \)}x;" now i need to use recursion the other way around, that is, any character BUT parenthesis should act as a parenthesis; for instance, i want to replace "use only recursion" with "u(s(e( (o(n(l(y( ()r)e)c)u)r)s)i)o)n". to keep it simpler, the source text includes *no* parentheses. <14> open BANLIST,'<', 'ban.list' or die "can't open datafile: $!"; <14> print 0 | !!grep /'lala'/, <BANLIST>; <14> that returns 0 all the time <15> get rid of the 0 | !! <14> aww ok <14> wht do the !! do? <15> i think that was put there to confuse you ;) <15> not not? <14> why twice? <18> print 0 | !!grep /lala/, <BANLIST>; # I doubt the 's <14> i removed the 0 | now it doesnt do anything <15> m'lala' if you really like the ' character <14> open BANLIST,'<', 'ban.list' or die "can't open datafile: $!";
Return to
#perl or Go to some related
logs:
#php #css +ebuild +manifest file not found cannot open device /dev/input/mice no core pointer debian udev dont solotion math sendmail deferred secondary #math reset root password in myswl
+sendmail +aliases +user unknown #css
|
|