Installing Diaspora on Ubuntu on VirtualBox
I wrote up a little howto on the Diaspora git hub:
https://github.com/diaspora/diaspora/wiki/Installing-Diaspora-on-Ubuntu-on-VirtualBox
programmers blog
Installing Diaspora on Ubuntu on VirtualBox
I wrote up a little howto on the Diaspora git hub:
https://github.com/diaspora/diaspora/wiki/Installing-Diaspora-on-Ubuntu-on-VirtualBox
I made a script that will allow you to automatically remove all your Facebook friends at once.
Here is what you are going to need:
1. Open Firefox, Open Facebook and login!
2. Now, you must open the IDE by going: Firefox > Developer Tools > Selenium IDE (Ctrl + Alt + S on some computers)
3. Load Script File :
In Selenium IDE, do a File > Open > [Select the script file from above]
OK, the script is loaded and should look like this:
4. Test the script before you start by clicking on the individual items and watching what Firefox does. Start by clicking on the first few in order. (open /friends/,click css=… , click=…Report,)
5. If all that seems good, then run the test by doing : Actions > Play Current Test Case.
6. Now you wait. Go get some coffee. You should now see your browser doing a bunch of automated things and wave goodbye to all your precious friends.
Tips:
You may want to look at this previous post where I setup a PHP Webservice that uses JSON PDO – Accessed by JQuery AJAX
OK, so this code will use php to generate the JSON code that will get delivered over the internet to the JSONP (JSON Padding) client on an external domain. This allows your webservice to be available too whoever wants to call it.
Here is the PHP Code: (Not all of it, but enough to get the idea)
//http://SERVER_domain.com/webservice.php private function GetTriviaTag($row) { $t = new Tag(); $t->id = $row['id']; $t->triviaid = $row['triviaid']; $t->tagid = $row['tagid']; return $t; } public function GetWhere($where) { $retArray; $sql = "SELECT * FROM trivia_tags WHERE {$where}"; foreach ($this->pdo->query($sql) as $row) { $retArray[] = $this->GetTriviaTag($row); } return $retArray; } $where = " (1 = 1)"; // THIS WILL SELECT ALL $tarray = GetWhere($where); //OUTPUT JSON: header('Content-type: application/json'); echo $_GET['callback']; // <-- THIS IS IMPORTANT FOR EXTERNAL DOMAIN ACCESS!!! echo "(" . json_encode($tarray) . ")"; |
And now, to access it from javascript in an external domain (non – SERVER_domain.com ):
http://CLIENT_domain.com/Test.html:
<html> <head> <title>Test</title> <script src="http://code.jquery.com/jquery-latest.js"></script> </head> <body> <div id="triviaQuestions"> loading... </div> <script> $(function() { // THE 'callback=?' in this request is IMPORTANT FOR EXTERNAL DOMAIN ACCESS!!! $.getJSON('http://SERVER_domain.com/webservice.php&callback=?', function(data) { var items = []; var htmlResult = ""; $.each(data, function(key, val) { htmlResult += "<br />Q: "+ val.id +", '"+ val.question +""; }); $('#triviaQuestions').html(htmlResult); }); }); </script> </body> </html> |