• ftp via BASH! script

    Recently i developed an e commerce site that sends the order directly to a distributor for shipping after the bank transactions…
    Being a relatively new nerd, i work best destroying someone else’s code (script lion)… so here’s a lil contribution since every example i googled was (significantly) different. Here is a bash script that will upload files if your using a typical Media Temple server using Linux / CentOS 5… Script will also move the files to a new directory… just delete if you don’t want to move anything when your done…

    #!/bin/bash
    set -m
    theDate="$(date +%Y-%m-%d)"

    ftp -vinp ftp.urAddress.com <
    quote USER yourusername
    quote PASS 9assword
    cd Upload
    binary
    put /path/to/your/file/PO850.xml ‘date +%d_%m_%y’_PO850.xml
    quit
    EOF

    cp /path/to/your/file/*.xml /path/to/your/other_directory/

    rm /path/to/your/file/*.xml

    exit 0

    Hope this helps someone… oh… and to the younger script kiddies… don’t be afraid of Linux… shits, tit after a bit!

     worldthreat No comments





  • Diamond Age (or A Young Lady’s Illustrated Primer )

    absolutely in love with the new G1!

    …Shouldn’t have afforded it but glad i could! This phone is a beast! Using connectBot SSH Client, I can reset a server @ 70 MPH on the friggin freeway, which of course is a blessing for work! This new technology is reminiscent of Neal Stephenson’s “Diamond Age (or A Young Ladies Primer)”. In “diamon Age”… PEEP IT!

    I never thought i’d let Google know EVERYTHING about me, but i don’t have much to hide, so… I guess it’s worth it for superb technology that makes this geek’s life easier… and somehow more fun!

    :P

     worldthreat No comments





  • ok. going to bread, but….
    i wrote some code that

      is

    a rap? yeah!
    yes i did. any way’s here it is… i WILL update this blog as i finish the proper chorus (deleted a few lines) & or get nicer at this werded algebra…. that’s”worded”…. to you whippersnappers!

    .theFont{
    font-family:Arial, Helvetica, sans-serif;
    color:#0033CC;
    }

    $connect = mysql_connect(“localhead”,”brain”,”evilFunkPuppet”);
    if (!$connect)
    {
    die(‘Could not connect: ‘ . mysql_error());
    }

    mysql_select_db(“songs”, $connect);

    $instrumental = mysql_QUERY(“SELECT * FROM `electroLife` WHERE `instrumental` = ’1′”);
    $result = mysql_QUERY(“SELECT FROM `electroLife` WHERE `instrumental` = ’1′”);

    verseOne();

    verseTwo();

    function verseOne(){

    $smoke = “making smoke. breaking bones.

    shotokan. no to stoogs
    “;

    echo ”

    stone cold, stone cool

    soul sold, so few

    understand. wondering.

    love withstand all my cons,

    plus my pros, all i want.

    love my bros. love my job.

    lug it all spot to spot.

    place to place. stop to stop.

    face to face i make my case.”;
    echo $smoke;
    echo “contact the lung. oh here it goes.

    dialate. diet pills.

    concentrate. nice ‘n still.

    define array. populate.

    semi-col.

    curly brace

    “;
    }

    function verseTwo(){

    $lostAndFound = ”

    it’s obvious lost and found rhymes to it.

    grind to it. get up high and bend the spine to it.
    ” ;

    echo ”

    a couple words here and there.

    end the world cause i dont care.

    cause i can. because you cant

    understand my muttering.

    stumbling. end of the internet.

    once again i recollect.

    wipe my ass and blow my nose.

    i wrote like this cause i don’t know.

    design and pro-

    gram an ounce
    ” ;
    echo $lostAndFound;
    echo “damnit it now.

    say it loud.

    GOOD DAMN!

    “;
    }

    ….tooo super simple right now… but yeah.. that’s how it came out 4real….

     worldthreat 3 comments

    3 comments - Latest by:
    • certified nerd - world threat
      [...] worldthreat on May.20, 2009, under Music remember that rap i wrote in php? Well, here’s the verse in ...
    • Ryan T Graff
      Crazy stuff dude, can't wait to here it with a beat and everything!
    • Shawn
      $smoke = “making smoke. breaking bones. shotokan. no to stoogs"; Nice hook. :)






Shout Outs!

highly recommended brethren...

  • Electric Sheep
  • i am cell
  • mlebrun.com
  • rob o’toole – the flexiest man alive
  • ryantgraff.com