This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $connections = array( | |
| 'hosts' => array( | |
| array( | |
| 'host' => 'host', | |
| ), | |
| array( | |
| 'host' => 'host', | |
| 'port' => 27018, | |
| ), | |
| ), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rs.initiate({"_id" : "default", members : [ | |
| {"_id" : 0, priority : 3, host : "host:27017"}, | |
| {"_id" : 1, host : "host:27018"}, | |
| {"_id" : 2, host : "host:27019", arbiterOnly : true} | |
| ] | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "rubygems" | |
| require "xmpp4r" | |
| require 'xmpp4r/client' | |
| require 'xmpp4r/muc' | |
| jabber_user = "[email protected]" | |
| jabber_password = "password" | |
| jabber_conference = "[email protected]" | |
| jabber_nick = "user" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function post() | |
| { | |
| FB.api('/me/<ВАШ NAMESPACE>:listen' + | |
| '?song=<ССЫЛКА НА СТРАНИЦУ>','post', | |
| function(response) { | |
| if (!response || response.error) { | |
| alert('Error occured'); | |
| } else { | |
| alert('Post was successful! Action ID: ' + response.id); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <fb:login-button scope="publish_actions">Login with Facebook</fb:login-button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <meta property="fb:app_id" content="<ID приложения>" /> | |
| <meta property="og:type" content="<ВАШ NAMESPACE>:song" /> | |
| <meta property="og:title" content="The Magician - Magic Tape Fifteen" /> | |
| <meta property="og:image" content="http://i1.sndcdn.com/artworks-000011517440-ht8lrf-large.jpg?1e7f8e7" /> | |
| <meta property="og:description" content="Listen The Magician - Magic Tape Fifteen" /> | |
| <meta property="og:url" content="<ссылка на страницу>"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script src="http://connect.facebook.net/en_US/all.js"></script> | |
| <div id="fb-root"></div> | |
| <script> | |
| FB.init({ | |
| appId:'<ID приложения>', cookie:true, | |
| status:true, xfbml:true, oauth:true | |
| }); | |
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" | |
| xmlns:fb="https://www.facebook.com/2008/fbml"> | |
| <head prefix="og: http://ogp.me/ns# <ВАШ NAMESPACE>:http://ogp.me/ns/apps/<ВАШ NAMESPACE>#"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $wantsSet = new Rediska_Key_Set("user:".$uid.":m"); | |
| $intersect = $wantsSet->intersect(new Rediska_Key_Set("user:".$uid.":w")); | |
| $yeahCount = count($intersect); | |
| if($intersect !== false && $yeahCount > 0) | |
| { | |
| $rediska->publish("notify", json_encode(array("uid" => $uid, 'count' => $yeahCount))); | |
| } |
NewerOlder