User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » favorite scripts! Page [1]  
quagmire02
All American
44225 Posts
user info
edit post

this thread may die a lonely death, but i thought it'd be cool for everyone to post their favorite/newest/coolest scripts (ajax, php, whatever)...link to the site, show it off, whatever...inspired by the AJAX image popup thread

lightbox 2: http://www.huddletogether.com/projects/lightbox2/

[Edited on September 27, 2007 at 6:25 PM. Reason : .]

9/27/2007 6:24:16 PM

qntmfred
retired
40556 Posts
user info
edit post

$maxerrors = 220;
$pi = reverse "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865
132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867
831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600
113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279
381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452
635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297
747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387
528865875332083814206171776691473035982534904287554687311595628638823537820166732315642315632318742318732312842312832365832369
732364722392310116732315642315632328732318742312832312832315842315832319742319732314772392310116732365632318712318722318742352
832315842315832319742319732314772392310116732315642315632318722318712318732312842312832315842315832319742319732314772392310116
742345642318732328732362832315842315832369732314772392330172392310166732312842312832369682310882310116742312832312882319682310
882310116742352862339642350882310116732312842312882319632310842310882310116732362832369632360882340169632312742312762314822310
1196323127423127623148223101923396323627623148223101196323127423127623148223101696323127423127423548101";

while ($offset < length($pi)) {
my($x) = substr($pi, $offset +++ 0, 2);
my($y) = substr($pi, $offset +++ 1, 1); # XXX should be 3?
my($z) = substr($pi, $offset +++ 2, 1);
if ($x * cos($y) / cos($z)) {
$dbg .= chr ($x) x $y;
if (++$errors >= $maxerrors) {
# "cannot happen"
die("$dbg\n");
}
}
}


[Edited on September 27, 2007 at 6:40 PM. Reason : added line breaks for no sidescrolling]

9/27/2007 6:31:57 PM

joe_schmoe
All American
18758 Posts
user info
edit post

hey, fucker. that was mine

9/27/2007 7:54:31 PM

ncsuapex
SpaceForRent
37776 Posts
user info
edit post

Ive used some scripts off this guys site.


http://www.scriptarchive.com/

9/27/2007 8:03:05 PM

qntmfred
retired
40556 Posts
user info
edit post

^^ you could always take

int main() { char *s = "int main() { char* s = %c%s%c; printf(s, 34, s, 34); }"; printf(s, 34, s, 34); }

9/27/2007 8:11:10 PM

darkone
(\/) (;,,,;) (\/)
11609 Posts
user info
edit post

Add a description and note the language.

9/27/2007 8:17:19 PM

moron
All American
34024 Posts
user info
edit post

^^...^

This is what i get when I run that:

Rons-AlBook:~ ron$ perl test.sh 

TTTTT H H EEEEEE
T H H E
T HHHHHH EEE
[[[=```B``333333RRRQQQ666&??%%%%%%
J O O U U R R N N N A A L
]]?```888QQQQQQ333333 O U U 55////////


It looks like it's suppose to say something journal or something.

[Edited on September 27, 2007 at 9:03 PM. Reason : ]

9/27/2007 9:03:27 PM

qntmfred
retired
40556 Posts
user info
edit post

see http://en.wikipedia.org/wiki/Quine_(computing)

[Edited on September 27, 2007 at 9:15 PM. Reason : (]

9/27/2007 9:15:18 PM

moron
All American
34024 Posts
user info
edit post

I was talking about the perl script.

i got what the C one did...

9/27/2007 9:22:55 PM

qntmfred
retired
40556 Posts
user info
edit post

yeah, wp link was for darkone's benefit

not sure why yours didn't work. i ran it on mine and it worked. source (p. 9)

9/27/2007 9:36:58 PM

moron
All American
34024 Posts
user info
edit post

It was the linefeeds screwing it up.

I don't know any perl, but I can't figure out what's what in that code... crazy.

[Edited on September 27, 2007 at 9:58 PM. Reason : ]

9/27/2007 9:55:53 PM

joe_schmoe
All American
18758 Posts
user info
edit post

the perl script, before qntmfred fucked it up, is this.

its a play on the main concept of Carl Sagan's "Contact"

Quote :
"

$maxerrors = 220; # needs tuning
$pi = reverse "3.141592653589793238462643383279502884197169399375105820974944592
30781640628620899862803482534211706798214808651328230664709384460955058223172535
94081284811174502841027019385211055596446229489549303819644288109756659334461284
75648233786783165271201909145648566923460348610454326648213393607260249141273724
58700660631558817488152092096282925409171536436789259036001133053054882046652138
41469519415116094330572703657595919530921861173819326117931051185480744623799627
49567351885752724891227938183011949129833673362440656643086021394946395224737190
70217986094370277053921717629317675238467481846766940513200056812714526356082778
57713427577896091736371787214684409012249534301465495853710507922796892589235420
19956112129021960864034418159813629774771309960518707211349999998372978049951059
73173281609631859502445945534690830264252230825334468503526193118817101000313783
87528865875332083814206171776691473035982534904287554687311595628638823537820166
73231564231563231874231873231284231283236583236973236472239231011673231564231563
23287323187423128323128323158423158323197423197323147723923101167323656323187123
18722318742352832315842315832319742319732314772392310116732315642315632318722318
71231873231284231283231584231583231974231973231477239231011674234564231873232873
23628323158423158323697323147723923301723923101667323128423128323696823108823101
16742312832312882319682310882310116742352862339642350882310116732312842312882319
63231084231088231011673236283236963236088234016963231274231276231482231011963231
27423127623148223101923396323627623148223101196323127423127623148223101696323127
423127423548101";

while ($offset < length($pi)) {
my($x) = substr($pi, $offset +++ 0, 2);
my($y) = substr($pi, $offset +++ 1, 1); # XXX should be 3?
my($z) = substr($pi, $offset +++ 2, 1);
if ($x * cos($y) / cos($z)) {
$dbg .= chr ($x) x $y;
if (++$errors >= $maxerrors) {
# "cannot happen"
die("$dbg\n");
}
}
}
# passes sig test
print("ok!\n");

"

9/28/2007 1:27:09 AM

clalias
All American
1580 Posts
user info
edit post

^that's pretty cool

9/28/2007 8:01:04 AM

GraniteBalls
Aging fast
12262 Posts
user info
edit post

i like this thread.



more scripts, plz.

9/28/2007 2:08:31 PM

quagmire02
All American
44225 Posts
user info
edit post

not QUITE the point of the thread, but still ^

9/28/2007 3:17:58 PM

philihp
All American
8349 Posts
user info
edit post

http://www.antiquark.com/sliderule/sim/n909es/virtual-n909-es.html

9/28/2007 5:45:07 PM

Novicane
All American
15413 Posts
user info
edit post

print "Hello World!"

9/28/2007 6:03:58 PM

joe_schmoe
All American
18758 Posts
user info
edit post

several years ago, i wrote a script that would take your server name and location in Shadowbane (MMORPG), parse the 3rd party website listings of rune/armor/weapon-dropping mobs, and tell you direction and distance to all items around your location, or conversely, tell you direction and distance to the particular rune/armor/weapon-dropping mob you were looking for.

it was pretty cool, if i say so myself.






[Edited on September 28, 2007 at 7:34 PM. Reason : ]

9/28/2007 7:32:27 PM

ncsuapex
SpaceForRent
37776 Posts
user info
edit post

2 simple but very useable scripts

Records the State games from a AM/FM stereo connected through the line in. Adds the date/time stamp to the file.

sox -t ossdsp -w -s -r 44100 -c 2 /dev/dsp -t raw - | lame -x -m s - /location/NCState-Louisville`date +%b%d_%H%M_%Y`.mp3


Records the State game from an internet feed: Also adds the date/time stamp

mplayer -dumpstream -dumpfile /location/ncstate-louisville`date +%b%d_%H%M_%Y`.mp3 http://wmc2.liquidcompass.cc/WILT


If anyone has any suggestion for changes let me know. These scripts worked fine on my old Slackware box but since the motherboard crashed I've had to use an older PC using a Slax Live CD and it doesn't seem to work as well.

9/29/2007 12:09:01 PM

 Message Boards » Tech Talk » favorite scripts! Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.38 - our disclaimer.