Slashdot Mirror


User: hkz

hkz's activity in the archive.

Stories
0
Comments
93
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 93

  1. Re:On LInux: on Lawsuit Hits Companies Using 'Zombie' Flash Cookies · · Score: 1

    You're right, I mistakenly assumed that ~ would be aliased to /root when sudo'ing, but the shell expands the tilde, not sudo. So:

    sudo chown root::root ~/.adobe/Flash_Player
    sudo chmod 0000 ~/.adobe/Flash_Player

    I did this and it sort of broke Flash for me on a lot of sites, so YMMV.

  2. On LInux: on Lawsuit Hits Companies Using 'Zombie' Flash Cookies · · Score: 1

    sudo chown root::root ~yourusername/.adobe/Flash_Player
    sudo chmod 0000 ~yourusername/.adobe/Flash_Player

  3. Re:Put them on Japanese whaling vessels on Heat Ray Gun Fails Final Test; Nixed From War · · Score: 1

    There was talk about installing these devices on ships passing through Somali waters as an anti-piracy measure.

  4. Re:Shenanigans on iPhone DSLR Prototype 1.0 · · Score: 1

    Yes. Those are photos of a defocused patch of light. My original statement still stands. The only way this would work is by taking pictures through an SLR viewfinder, which has, you know, a ground glass on which the projected image forms. You cannot otherwise stack two photographic lenses.

  5. Shenanigans on iPhone DSLR Prototype 1.0 · · Score: 1

    This thing cannot work, unless they remove the iPhone's original lens, of which the article makes no mention. You simply cannot stack lenses like that. Compare it to what you see when you look (with your eye, which is a lens) through the rear of a lens. You see a round patch of light, not a whole view of the world. The iPhone would see the same thing. Also, if you _did_ remove the original lens, you'd end up with an enormous crop factor, turning every SLR lens into a very long tele. Try holding that steady with a mount like this. In short, I call shenanigans, get the brooms!

  6. Re:Correlation is not causation on Parasite Correlated With World Cup Success · · Score: 3, Funny

    Holland has an infection rate of "eventually 80%" (source: http://www.nvkc.nl/tijdschrift/content/1999/nr%201/p65/1999-1-p65.pdf ), which does eerily correlate with our soon-to-be world cup win. (Disclaimer: there are orange crowds singing outside after "our" win to Uruguay, and to Germany I would like to say, "Schade Deutschland, alles ist vorbei!" ;-)

  7. Correlation is not causation on Parasite Correlated With World Cup Success · · Score: 4, Insightful

    Sorry for shooting for the obvious, but the old trope about correlation and causation seems exactly in order here.

  8. Use passphrases on Russian Spy Ring Needed Some Serious IT Help · · Score: 4, Interesting

    Passwords are the wrong solution. Trying to make people remember a short string with high entropy is hard, so people write them down. The other way around is much better - long passphrases with less of the tedious entropy. Quotations, lyrics, names, whatever. They're much easier to remember and much harder to brute-force. Sprinkle in some punctuation and you're golden.

  9. Well, as long as it's closeted... on What Scientists Really Think About Religion · · Score: 0, Flamebait

    Well, as long as it's closeted, I don't care what safety blanket they need to survive the realities of life. Let them believe in Dog. But never, ever let them get away with fusing it into their science. Religion is at best "outside the realm" of science, which is a polite way of saying it's irrelevant to reality, which is a polite way of saying it's a harmful delusion. Fine with me if you live your life that way, but keep it to yourself.

  10. Re:An equation with two unknowns on The Futurama of Physics · · Score: 1

    Take B = Pi. Then E = 9.87*sin(2Pi) - 7.73*cos(Pi) - 1.5*sin(Pi) = 9.87*0 - 7.73*-1 - 1.5*0 = 7.73. (Assuming multiplication binds stronger than addition.) Not so complex, right? Am I overanalyzing this?

  11. Re:Physics jokes are fun, but... on The Futurama of Physics · · Score: 3, Interesting

    Slashdot makes up for it by posting an X-Fry, X-Leela, X-bender or other header with every HTTP response. If you know it or not, you've received thousands of these witticisms (unless you're New Here.) X-Fry: Leela, Bender, we're going grave-robbing. X-Fry: Hooray, we don't have to do anything! X-Fry: I haven't had time off since I was twenty-one through twenty-four. X-Fry: How can I live my life if I can't tell good from evil?

  12. An equation with two unknowns on The Futurama of Physics · · Score: 1

    “I believe this ‘paradoxicality’ equation to be unsolvable,” he says, pointing to the equation, E=9.87sin(2B)-7.53cos(B)-1.5sin(B), written on a blackboard. “Ergo, time travel is impossible. But I can’t quite prove it.”

    So the humor here is that it's paradoxical to want to solve a single equation with two variables? Or am I being too geeky here? After all, the solution is *trivial*...

  13. Nothing to see here, etc on Proof of Concept For Ajax Without JavaScript · · Score: 3, Informative

    So you post a form to an iframe by pressing a submit button, and the iframe reloads with new dynamic content? And this is somehow AJAX? The whole interesting thing with AJAX is that you can interact with the web server while staying on the same page. You can type something into a search box, say, and the webserver sends you back some matching words in real time. Sure you could mimic the same thing with a POST and a results page, but that is exactly the paradigm that AJAX was supposed to replace.

  14. Re:Off the top of my head... on Adding Some Spice To *nix Shell Scripts · · Score: 1

    You can check whether you're outputting to a terminal with test -t. If the output is not going to a terminal (say, to a pipe), you can print a plain vanilla string. You can output colour codes as straight ANSI escapes, or (probably better), use tput.

    Example log function:


    log() {
        test -t 1 && { tput setf 4; cat; tput setf 7; } || cat
    }

    dmesg | log

    This tests whether stdout is a terminal, and if so, prints the text in red. Otherwise (if stderr is redirected to a pipe or file) it prints the plain string.

  15. Re:Off the top of my head... on Adding Some Spice To *nix Shell Scripts · · Score: 1

    MySQL replaces the password in the process table with a series of 'x' characters. Try it. The password is safe. While I agree that not passing anything on the commandline is a better solution, my MySQL version (5.0.67) does not support --defaults-file or --defaults-extra-file.

  16. Re:None, I have given up bash scripting on Adding Some Spice To *nix Shell Scripts · · Score: 1

    tar tf file.tar | while read file; do rm "$file"; done

    This works because the entire line is read into $file, spaces and all.

  17. Re:Nice example. on Adding Some Spice To *nix Shell Scripts · · Score: 3, Informative

    Thanks, it's nothing I couldn't show a fella. Learnt a lot from my colleagues and from the O'Reilly 'Unix Power Tools' book. The Advanced Bash Shell-scripting Guide is pretty good (but chaotic) too.

    The syntax filter here munged some of the examples, though. The here document example will not work as-is, because there should be two 'less-than' signs in front of the minus sign. The mysql_query function probably also won't work (can't bother to run a test), because the newline after the first bracket mysteriously disappeared. So best to loop up the concepts in some kind of reference manual.

  18. Off the top of my head... on Adding Some Spice To *nix Shell Scripts · · Score: 4, Informative

    I work as a Linux netadmin and system developer, so I do a lot of shell programming in (ba)sh. Here's some of the niftier things you can do to a shell script:

    - Make colored output with shell escape sequences. Works especially well with red type for error messages, makes them really stand out.
    - Use inline functions a lot. The great thing about them is that you can pipe to them and use them in all kinds of places. For instance, to do mysql queries:

    mysql_query() { /usr/bin/mysql --user=root --pass=topsecret database
    }

    echo 'SELECT * FROM accounts' | mysql_query

    - "Here documents". For long MySQL sequences, something like the following (reusing the mysql_query function from above):

    cat - EOF | mysql_query
          SELECT bar
          FROM foo
          WHERE baz ...
    EOF

    This lets you easily format stdin for scripts and other programs. Also really useful for outputting HTML and stuff like that. Best thing is that variables are expanded inside the block.

    - The || and && operators. Check if a file exists, remove if so, else complain:
    [ -f /tmp/somefile.txt ] && rm /tmp/somefile.txt || echo "Does not exist!"

    Also common in this form:
    [ -x /usr/bin/necessaryprogram ] || { echo "aaargh"; exit 1; }

    - Making a "multithreaded" shellscript is also one of my favourites. Say, you want to start five virtual machines at the same time. Write a function that starts a vm, and call it a few times in a loop, backgrounding each instance with &, and saving their PIDs. Then have a "wait loop" that waits for the PIDs to exit the system (or for a timeout to occur).

    - Proper argument handling with getopt. Have your script take "real" arguments in any order, just like real binaries.

    This just scrapes the surface of the surface, of course. I learn new stuff every day.

  19. lol , this is funny. on Twitter Hit By BZPharma LOL Phishing Attack · · Score: -1, Redundant

    lol , this is funny.

  20. Re:Ghost ridin' the whip! on Windows 7 Can Create Rogue Wi-Fi Access Point · · Score: 1

    Note: I was deliberately playing down the consequences of that scenario. You could "own" someone pretty thoroughly if that someone was uninformed enough (which 90% of people are) to send sensitive stuff over the network unencrypted. Which is why I use ssh tunnels to a trusted server whenever I'm on an open AP.

  21. rouge? on Windows 7 Can Create Rogue Wi-Fi Access Point · · Score: 0

    I'd be more impressed if Windows 7 could create a rouge access point.

  22. Ghost ridin' the whip! on Windows 7 Can Create Rogue Wi-Fi Access Point · · Score: 5, Funny

    Ghost ridin' the whip! No seriously, I've been wanting to use the Linux host AP features to bring up a mischievous AP that does man-in-the-middle attacks. I'd be connected to some open wifi somewhere, and someone would connect to my netbook and also see an open access point. I'd then give them the upside-downternet: http://www.ex-parrot.com/pete/upside-down-ternet.html

  23. Re:No. on Is Plagiarism In Literature Just Sampling? · · Score: 1

    This is the original piece of music that The Verve sampled from:
    http://www.youtube.com/watch?v=cVuh1Ymve2I

    It's an orchestral remake of 'The Last Time', which (to my ears) is a completely different song. This remake, and The Verve's version, are both great works of art.

  24. Re:You are incorrect on Can You Trust Chinese Computer Equipment? · · Score: 1

    Again, as a European, I don't care very much for either. I'd prefer the US as a lesser evil, but I trust the United States AND China about as far as I can throw them.

  25. Re:You are incorrect on Can You Trust Chinese Computer Equipment? · · Score: 1

    As a European, that is actually not very comforting at all. The USA has no qualms in eavesdropping on foreign persons, and you guys have the NSA who has the chops to pull it off.