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
// Send the message to all clients except the sender | |
socket.broadcast.emit('event', data); | |
// Same but not guaranteed | |
socket.volatile.emit('event', data); | |
// Send the message to all clients including the sender | |
io.sockets.emit('event', data); |
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
// create an http server listening on port 8000 | |
var io = require('socket.io').listen(8000); | |
// listen on new connections | |
io.sockets.on('connection', function (socket) { | |
// listen on an event called "eventA" | |
socket.on('eventA', function(data) { | |
// send "eventA" to all clients, except the sender |
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
// create socket connection | |
var socket = io.connect('http://localhost:8000'); | |
// listen to an event | |
socket.on('event', function(data) {}); | |
// send an event | |
socket.emit('event', data, function() {}); |
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 type="text/javascript" src="http://localhost:8000/socket.io/socket.io.js"></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
<? | |
/** | |
* @see http://codex.wordpress.org/Function_Reference/get_comments | |
*/ | |
?> | |
<!-- DYNAMIC:WORDPRESS --> | |
<h3><?= $title ?></h3> | |
<a class="feed" href="<?= $feed ?>">Kommentare als RSS</a> | |
<ul class="recentcomments"> | |
<? foreach($comments as $comment) { ?> |
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
<extension point="com.github.eclipsecolortheme.theme"> | |
<theme file="themes/black-pastel.xml" /> | |
</extension> |
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
<extension point="com.github.eclipsecolortheme.mapper"> | |
<mapper | |
class="com.github.eclipsecolortheme.mapper.GenericMapper" | |
name="Ant" | |
pluginId="org.eclipse.ant.ui" | |
xml="mappings/org.eclipse.ant.ui.xml"> | |
</mapper> | |
</extension> |
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
product = yourproject | |
version = 1.0.0 |
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
version = 0.0.0 |
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
PRODUCT="myproject" | |
VERSION="1.0.0" | |
FILE="/your/path/to/software/releases/$PRODUCT-$VERSION.tar.gz" | |
rm -R /opt/app/$PRODUCT-$VERSION | |
mkdir /opt/app/$PRODUCT-$VERSION | |
cd /opt/app/$PRODUCT-$VERSION | |
tar xvf $FILE |