<?php

/*
* Template Name: Slack
*/
get_header();
?>

<?php 
$redis = new TinyRedisClient('localhost:6379');
?>

  <div id="primary" class="content-area">
    <main id="main" class="site-main" role="main">

      <h1 class="entry-title">Join the Community</h1>
      <h2 class="entry-subtitle">LEARN, DISCUSS, SHARE, CONTRIBUTE</h2>
      <p>Join our <a href="http://socketio.slack.com" target="_blank">Slack</a> server to discuss the project in realtime.</p>
      <ul>
        <li><b>Talk</b> to the core devs and the Socket.IO community.</li>
        <li><b>Learn</b> from others and ask questions.</li>
        <li><b>Share</b> your work and demos.</li>
      </ul>
<p>Enter your email to join the Socket.IO community Slack 
  <a href="http://socketio.slack.com" target="_blank">server</a>:</p>
      <form action="">
        <p><input type="text" placeholder="*****@*****.**" /></p>
      </form>
      <p id="join-footer">At this time 
        <b class="slack-users-count"><?php 
echo $redis->get('slack_users_count');
	<footer id="colophon" class="site-footer" role="contentinfo">
		<div class="site-info">
			<span class="footer-left">SOCKET.IO IS OPEN-SOURCE (MIT). RUN BY <a href="https://github.com/Automattic/socket.io/graphs/contributors">CONTRIBUTORS</a>. </span>
      <span class="footer-right">
        <a href="https://twitter.com/socketio" class="twitter-follow-button" data-show-count="true" data-lang="en">Follow @socketio</a>
      </span>
		</div><!-- .site-info -->
	</footer><!-- #colophon -->
</div><!-- #page -->

<?php 
wp_footer();
?>

<?php 
$redis = new TinyRedisClient('localhost:6379');
?>

<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://cdn.socket.io/socket.io-1.3.0.js"></script>
<!-- Twitter script -->
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

<script>
(function() {
  var slack_users_count = <?php 
echo $redis->get('slackin_active');
?>
;
  var count = $('<span id="slack-count">').text(slack_users_count);
  var socket = io('http://slack.socket.io');
Example #3
0
	</div><!-- #content -->

	<footer id="colophon" class="site-footer" role="contentinfo">
		<div class="site-info">
			<span class="footer-left">SOCKET.IO IS OPEN-SOURCE (MIT) AND RUN BY <a href="https://github.com/Automattic/socket.io/graphs/contributors">CONTRIBUTORS</a>. <a href="https://twitter.com/socketio" class="twitter-follow-button" data-show-count="true" data-lang="en">Follow @socketio</a></span>
			<span class="footer-right"><a href="http://automattic.com">SUPPORTED BY<div id="a8c-image"></div></a></span>
		</div><!-- .site-info -->
	</footer><!-- #colophon -->
</div><!-- #page -->

<?php 
wp_footer();
?>

<?php 
$redis = new TinyRedisClient('localhost:6379');
?>

<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://cdn.socket.io/socket.io-1.3.0.js"></script>
<!-- Twitter script -->
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

<script>
(function() {
  var slack_users_count = <?php 
echo $redis->get('slack_users_count');
?>
;
  var li = $('<li class="menu-item"><a href="/slack">Slack</a></li>')
  var count = $('<span id="slack-count">').text(slack_users_count);
Example #4
0
<?php

require_once dirname(__FILE__) . '/TinyRedisClient.class.php';
$client = new TinyRedisClient($argv[1]);
/* start */
$client->del('test:key');
/* strings */
assert($client->set('test:key', 'value') === 'OK');
assert($client->get('test:key') === 'value');
assert($client->del('test:key') === '1');
assert($client->get('test:key') === null);
/* exceptions */
try {
    $client->sadd('test:key', 'item1', 'item2');
    assert(false);
} catch (Exception $ex) {
}
/* sets */
assert($client->sadd('test:key', 'item1') === '1');
assert($client->sadd('test:key', 'item2') === '1');
assert($client->smembers('test:key') === array('item1', 'item2'));
assert($client->scard('test:key') === '2');
assert($client->del('test:key') === '1');
assert($client->scard('test:key') === '0');
assert($client->smembers('test:key') === array());
/* multi */
assert($client->sadd('test:key', 'item1') === '1');
assert($client->sadd('test:key', 'item2') === '1');
assert($client->multi() === 'OK');
assert($client->smembers('test:key') === 'QUEUED');
assert($client->smembers('test:key') === 'QUEUED');
 * User: Juan M.
 * Date: 9/3/15
 * Time: 12:31 AM
 */
require_once 'phpFlickr.php';
include 'vendor/autoload.php';
$flickrObject = new phpFlickr("46dea5f6abb12aed7a823adb7ecf5816");
$pics_file = fopen("pics_file_temp.txt", "w") or die("Unable to open file!");
$photos = $flickrObject->photos_search(array("tags" => "trip,travel,vacation,objects,color,- people,- person,- bikini,- human", "tag_mode" => "any", "per_page" => "5", "sort" => "interestingness-desc", "content_type" => "1", "safe_search" => "1", "license" => "9"));
//Initializing variables
$imageCounter = 0;
$idArrayImages = array();
/**
 * @TinyRedisClient
 */
$redisClient = new TinyRedisClient('localhost:6379');
//For each Picture
foreach ($photos['photo'] as $photo) {
    //Console Log image message counter
    echo "Image: " . $imageCounter++ . " / ";
    //We get the Information of each photo giving the Photo_ID
    $photo_info = $flickrObject->photos_getInfo($photo['id']);
    echo $photo["id"] . ' - ';
    if (in_array($photo['id'], $idArrayImages)) {
        echo "Hay una imagen repetida";
    }
    $idArrayImages[] = $photo['id'];
    //Uncomment this line to see the PUBLIC URL of the photo
    //echo $photo_info['photo']['urls']['url'][0]['_content']."\n";
    //We stract the TAGS array for each photo
    $array_tags = $photo_info['photo']['tags']['tag'];