Search Results

Search found 9 results on 1 pages for 'kittyyoung'.

Page 1/1 | 1 

  • Shell script to decrypt and move files from one directory to another?

    - by KittyYoung
    So, I have a directory, and in it are several files. I'm trying to decrypt those files and then move them to another directory. I can't seem to figure out how to set the output filename and move it. So, the directory structure looks like this: /Applications/MAMP/bin/decryptandmove.sh /Applications/MAMP/bin/passtext.txt /Applications/MAMP/bin/encrypted/test1.txt.pgp /Applications/MAMP/bin/encrypted/test2.txt.pgp /Applications/MAMP/htdocs/www/decrypted/ For all of the files found in the encrypted directory, I'm trying to decrypt it and then move them into www/decrypted/. I don't know what the filenames in the encrypted directory will be ahead of time (this script will eventually run via cron), so I wanted to just output the decrypted file with the same filename, but without the pgp. So, the result would be: /Applications/MAMP/bin/decryptandmove.sh /Applications/MAMP/bin/passtext.txt /Applications/MAMP/bin/encrypted/ /Applications/MAMP/htdocs/decrypted/test1.txt.pgp /Applications/MAMP/htdocs/decrypted/test2.txt.pgp So, this is all I have so far, and it doesn't work... FILE and FILENAME are both wrong... I haven't even gotten to the moving part of it yet.... Help? I've written exactly one shell script ever, and it was so simple, a monkey could have done it... Feeling out of depth here... pass_phrase=`cat passtext.txt|awk '{print $1}'` for FILE in '/Applications/MAMP/bin/encrypted/'; do FILENAME=$(basename $FILE .pgp) gpg --passphrase $pass_phrase --output $FILENAME --decrypt $FILE done

    Read the article

  • PostGreSQL - pgloader installation?

    - by KittyYoung
    Granted... this is a dumb question, but it's still a mystery to someone like me, whose never done it before... I'm trying to install pgloader, but I can't seem to find any documentation.... I'm running MAMP on MAC OS X. I've already installed the tcllib, and am about to do: wget http://pgfoundry.org/frs/download.php/233/pgloader-1.0.tar.gz tar zxvf pgloader-1.0.tar.gz I'm wondering what directory I need to actually untar pgloader into? Is there anything else that I need to do to get it to work?

    Read the article

  • jquery creating stacked bar chart with flot?

    - by KittyYoung
    I'm using jquery flot and I'm trying to create a stacked bar chart, but I'm having some syntax issues... I'll post my code at the end of this, but I'm quite certain it's wrong. I do get a stacked bar chart, but there's only three columns... Basically, here is the data that I'm working with and what I want to accomplish... The first group (Focus Group 1) on each line is the bottom bar of the stacked bar, the second group (Focus Group 2) is the second, and the third group (Focus Group 3) is the top group. The "Responses" are what I want to use on the x-axis, the first number in each set is x, and the second number is y. Response1, [0, 0], [0,0], [0,9] Response2, [1, 5], [1,5], [1,11] Response3, [2, 2], [2,0], [2,8] Response4, [3, 1], [3,2], [3,6] Response5, [4, 0], [4,0], [4,7] I should also mention, that I'm not sure if a stacked chart is the best way to go... Admittedly, I'm not a very visual person, and generally find charts annoying... If there's a better way to present this data, then I am so totally open to suggestions... Essentially... I have a series of questions. Each of these questions were presented to three focus groups. Members of the focus groups selected a response. I'm trying to present the count per response, per focus group, for each question. I thought that a stacked chart would be the best way to go, but again, I'm open to other ways of doing this. The only thing is, I definitely need a visual representation of the data....

    Read the article

  • jquery add to an array on click?

    - by KittyYoung
    I'm confused regarding each() and .each()... I think I need to use both, but I'm not sure how... Basically, I have a series of checkboxes and when they're checked, I want to get the id of the closest table row and add it to an array that I can then serialize and pass to a function. So, the html looks like this: <tr id="t1"><td><input type="checkbox" name="did[]" value="232" class="bd" /></td></tr> <tr id="t2"><td><input type="checkbox" name="did[]" value="234" class="bd" /></td></tr> <tr id="t3"><td><input type="checkbox" name="did[]" value="676" class="bd" /></td></tr> <tr><td><button id="tsid" name="tsid" type="button">Send</button></td></tr> And, when (and if) the checkbox is selected, I want to get the closest tr id and store it in an array: var trids = [] And then serialize the input data and the trids array... So far, I only have this: $('#tsid').click(function() { //meant to get the values of the selected checkboxes var myData = $('input[name=did[]]').serialize(); //meant to find and store the closest tr ids in an array... $('.bd').each(function() { var trids = $(this).closest("tr").get(0); //and now I'm lost... }); }

    Read the article

  • jquery - get url path?

    - by KittyYoung
    I know I can use window.location.pathname to return a url, but how do I parse the url? I have a url like this: http://localhost/messages/mine/9889 and I'm trying to check to see if "mine" exists in that url? So, if "mine" is the second piece in that url, I want to write an if statement based on that... if(second argument == 'mine') { do something }

    Read the article

  • how to implement jquery php progress bar

    - by KittyYoung
    I have a multi-step form where the form on Step3 submits to Step4.php. Step4 is a results page, and it takes some time to load, so I wanted to try and implement a progress bar or a loading bar or something when the user clicks the step3 submit button before Step4.php actually loads. I would think I could do this with jquery? But, I'm not sure how. Is it possible to do this without having to use jquery to post the data to step4.php?

    Read the article

  • calling a stored postgres function from php

    - by KittyYoung
    Just a little confused here... I have a function in postgres, and when I'm at the pg prompt, I just do: SELECT zp('zc',10,20,90); FETCH ALL FROM zc; I'm wondering how to do this from php? I thought I could just do: $q = pg_query("SELECT zp('zc',10,20,90)"); But, how do I "fetch" from that query?

    Read the article

  • jquery add row on click only if it's empty?

    - by KittyYoung
    The code below works, insomuch that if I click in an input field, it'll add another row. I'm trying to figure out though, how to do that only if the input field is empty? $("#tableSearchData > tbody > tr > td > input").bind('focus', function(){ var row = $(this).closest("tr").get(0); if( row.className.indexOf("clicked")==-1 ) { var rowCopy=$(row).clone(true); $(row).closest("tbody").append(rowCopy); row.className+=" clicked"; } });

    Read the article

1