This file contains 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))); | |
} |
This file contains 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 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 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 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 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 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 = "user@jabber.ru" | |
jabber_password = "password" | |
jabber_conference = "conf@conference.jabber.ru" | |
jabber_nick = "user" |
This file contains 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 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 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
/* | |
RequireJS 2.0.4 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved. | |
Available via the MIT or new BSD license. | |
see: http://github.com/jrburke/requirejs for details | |
*/ | |
var requirejs,require,define; | |
(function(Y){function x(b){return J.call(b)==="[object Function]"}function G(b){return J.call(b)==="[object Array]"}function q(b,c){if(b){var e;for(e=0;e<b.length;e+=1)if(b[e]&&c(b[e],e,b))break}}function N(b,c){if(b){var e;for(e=b.length-1;e>-1;e-=1)if(b[e]&&c(b[e],e,b))break}}function y(b,c){for(var e in b)if(b.hasOwnProperty(e)&&c(b[e],e))break}function K(b,c,e,i){c&&y(c,function(c,j){if(e||!b.hasOwnProperty(j))i&&typeof c!=="string"?(b[j]||(b[j]={}),K(b[j],c,e,i)):b[j]=c});return b}function s(b, | |
c){return function(){return c.apply(b,arguments)}}function Z(b){if(!b)return b;var c=Y;q(b.split("."),function(b){c=c[b]});return c}function $(b,c,e){return function(){var i=fa.call(arguments,0),g;if(e&&x(g=i[i.length-1]))g.__requireJsBuild=!0;i.push(c);return b.apply(null,i)}}function aa(b,c,e){q([[" |
OlderNewer