Rossi

Rossi

(0 comments, 9 posts)

This user hasn't shared any profile information

Home page: http://www.geekz.za.net/

Posts by Rossi

Python vs. PHP

0

Lets quickly compare the two without wasting too much time:

#1 – Syntax

Python is it’s own funny thing, PHP resembles C/C++ very nicely. PHP wins

 

#2 – Speed (Time to echo “Hello World”) – 3 Runs to avoid the disk I/O.

Python:
real 0m0.027s
user 0m0.010s
sys 0m0.010s

PHP:

real 0m0.024s
user 0m0.020s
sys 0m0.000s

PHP Wins.

 

#3 – Looping 50000 times and printing the results.

for i in range(1, 50000):
print i

^^ is printing a newline. I googled and got this: http://stackoverflow.com/questions/4499073/printing-without-newline-print-a-prints-a-space-how-to-remove

Python is disqualified and no further tests are needed.

PHP Wins.

 

The reason for this post is that every single Python or Ruby on Rails developer will say with complete conviction that PHP is less than superior based on their own little understanding of programming languages as a whole and with out providing any valid arguments to justify their stance on the issue. So their informed input is nothing more than “Durrr, its too hard for me”.

The Worlds Best PDF Viewer

0

While looking over some typical engrish product documentation from a manhole in China (yes, a manhole) I tried to copy and paste from the constantly deteriorating Foxit Reader. Let me first say, foxit, your software is good. I was an avid fan before you started whacking a whole bunch of features in, now you are Adobe Reader 2.0.

The first thing I noticed while trying to copy something was, that functionality was disabled, I also noticed a share this on Facebook button which is why I un-installed foxit faster than you can say: “Beardless dial-up” – don’t ask, but it’s now possible to browse the net with out a beard! RMS, you can shave it now.

So on to the copy thing. Roelf pointed out a nifty little reader called Sumatrapdf (http://code.google.com/p/sumatrapdf/), it’s open source so it’s perfect. Try the copy thing again and ”Copying text was denied (copying as image only)”, I can’t paste images into Skype chats very easily, no non-bearded internet for me :(

But wait, let’s look at the source:

pdf_has_permission(pdf_xref *xref, int p)
{
if (!xref->crypt)
return 1;
return xref->crypt->p & p;
}

That’s the stupid bastard that is ruining the fun. So I got to installing VC++ to hack away the annoyance, in the meantime Roelf fired up IDA and edited the DLL, with “big having success” as they would say in China. A few thousand seconds later VC++ was installed so I decided to correct the “broken code” and fix the other glaring issue the Sumatra team seems to have missed, WHICH IS THE BRIGHT YELLOW

 

So here is a non yellow, PDF stupidity free version of Sumatra (2.0) for your consumption.

Sumatra Installer – 4.5mb – SumatraSane_Installer_2.0.exe
Sumatra Standalone Zip – 2.4mb – SumatraSane-2.0.zip 

I have not gone ahead and uploaded the code or sent it to the developers as it is a small change and I think if they wanted it to work this way, it would.

Slacking Off – Go lay some fibre!

1

I was at the V&A Waterfont this weekend and we took a boat trip around the harbour, which is something I have not done in ages. I must have picked the perfect day as there were tons of awesome boats docked. The Volvo around the world yacht race had a pit stop there and we were inches away from some impressive vessels. Then we came across the “Chamarel”, the picture does not do it any justice, I can only imagine amount of work that goes into laying our much needed undersea cables. I am not sure how these things work exactly, this is the front end of the ship, at the back there is another large (smaller than this one) winch and one on the left hand side (Port Side) which is probably to lift damaged cable up for repairs.


Chamarel at the V&A Waterfront


Now when they are done slacking off they can finish the fibre run to my house. Thanks guys.

The Periodic Table Of Swearing

0

Every now and then a device comes along which changes the world.

The motor car. The computer. The cellphone.

 

And now… The Periodic Table of Swearing.

 

Edit: I originally linked the Vimeo video but they are being prissy little prunes, so there’s the Youtube one.

Kittens

0

This post is Rated All Ages, and contains no scenes of bitch or moaning. Viewers discretion is not needed.


Here is a Cute Kitten.

cute kitten

Cute Kitten

Fuckyoubox.. I mean dropbox

1

[this a draft post]

So dropbox is pretty popular. Store your files blah blah blah.

Dropbox: LEARN TO FUCKING “COMPUTER”

root@hulk:~/test# touch 1.txt
root@hulk:~/test# touch 2.txt
root@hulk:~/test# touch 3.txt
root@hulk:~/test# sha1sum 1.txt
da39a3ee5e6b4b0d3255bfef95601890afd80709 1.txt
root@hulk:~/test# sha1sum 2.txt
da39a3ee5e6b4b0d3255bfef95601890afd80709 2.txt
root@hulk:~/test# sha1sum 3.txt
da39a3ee5e6b4b0d3255bfef95601890afd80709 3.txt

Those are SHA sums, I am sure dropbox uses a file list in similar fashion.

That’s cool hey. FUCK NO IT IS NOT FUCKING COOL.

Let’s look at a squid log for a Dropbox folder that is not being touched. I have removed the first 6 characters of the timestamp.

2736.889 75820 192.168.1.194 TCP_MISS/200 322 GET http://notify2.dropbox.com/subscribe? – DIRECT/199.47.217.144 text/plain
2812.589 75691 192.168.1.194 TCP_MISS/200 322 GET http://notify2.dropbox.com/subscribe? – DIRECT/199.47.217.144 text/plain
2888.829 76230 192.168.1.194 TCP_MISS/200 322 GET http://notify2.dropbox.com/subscribe? – DIRECT/199.47.217.144 text/plain
2965.269 76431 192.168.1.194 TCP_MISS/200 322 GET http://notify2.dropbox.com/subscribe? – DIRECT/199.47.217.144 text/plain
3041.489 76210 192.168.1.194 TCP_MISS/200 322 GET http://notify2.dropbox.com/subscribe? – DIRECT/199.47.217.144 text/plain
3117.129 75631 192.168.1.194 TCP_MISS/200 322 GET http://notify2.dropbox.com/subscribe? – DIRECT/199.47.217.144 text/plain
3192.599 75460 192.168.1.194 TCP_MISS/200 322 GET http://notify2.dropbox.com/subscribe? – DIRECT/199.47.217.144 text/plain
3268.379 75771 192.168.1.194 TCP_MISS/200 322 GET http://notify2.dropbox.com/subscribe? – DIRECT/199.47.217.144 text/plain
3344.809 76420 192.168.1.194 TCP_MISS/200 322 GET http://notify2.dropbox.com/subscribe? – DIRECT/199.47.217.144 text/plain
3475.689 130871 192.168.1.194 TCP_MISS/200 322 GET http://notify2.dropbox.com/subscribe? – DIRECT/199.47.217.144 text/plain

For the fucking retards at Dropbox that is roughly 75KB every 75seconds.. or 3.6MB an hour.. 86.4MB a day.. 2.67GB a month.

That’s half my Cell C 5GB cap.

Dropbox: LEARN TO FUCKING “COMPUTER”

Let’s look at the SHA hashing at the top

root@hulk:~/test# sha1sum 1.txt >>hashfile.txt
root@hulk:~/test# sha1sum 2.txt >>hashfile.txt
root@hulk:~/test# sha1sum 3.txt >>hashfile.txt
root@hulk:~/test# sha1sum hashfile.txt
60a7bed57a5dc111eecfada193732c37c7919bc2 hashfile.txt

O M G .. Did I just hash the hashfile.

IT’S FUCKING ROCKET SCIENCE. AMAZING!

Oh, VMWare

0

VMWare, you get a rant. You get a fucking rant in fact.

The Box has 2 Quad Core Xeons and runs 7 single processor VM’s.
The Box has 6gb of ram, free reports 700MB used by procceses and OS and 5.3GB for disk cache.

The VM goes:

pg_dump: SQL command failed
pg_dump: Error message from server: ERROR: could not read block 20990 of relation 1663/21382/21639: Input/output error

Followed by:

# ls
-bash: /bin/ls: Input/output error
# sync
-bash: /bin/sync: Input/output error
# df -h
-bash: /bin/df: Input/output error

YOU ARE RUINING MY FUCKING EVENING! SO FUCK YOU VMWARE, FUCK YOU!

If only we discovered KVM first.

Bandwidth defined

0

Penny Arcade -  The Fivefold Mother

Have we not all been there. When it comes to bandwidth, the more you pay, the more you are overpaying.

First

0

First!

Well, not really a first, but hey, everything went poof.

So new location, new host, etc…

Rossi's RSS Feed
Go to Top