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
var app = require('express').createServer() | |
var io = require('socket.io').listen(app); | |
var fs = require('fs'); | |
app.listen(8008); | |
// routing | |
app.get('/', function (req, res) { | |
res.sendfile(__dirname + '/chat.html'); | |
}); |
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="/socket.io/socket.io.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> | |
<script type="text/javascript"> | |
var my_username = ''; | |
function send_individual_msg(id) | |
{ | |
//alert(id); | |
//alert(my_username); | |
socket.emit('check_user', my_username, id); | |
//socket.emit('msg_user', id, my_username, prompt("Type your message:")); |
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
# | |
# Verify captcha | |
$post_data = http_build_query( | |
array( | |
'secret' => CAPTCHA_SECRET, | |
'response' => $_POST['g-recaptcha-response'], | |
'remoteip' => $_SERVER['REMOTE_ADDR'] | |
) | |
); | |
$opts = array('http' => |
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
https://www.google.co.in |
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
<template> | |
<label class="container"> | |
<input | |
v-bind="$attrs" | |
class="input" | |
type="checkbox" | |
:checked="checked" | |
@change="$emit('update:checked', $event.target.checked)" | |
/> | |
<span class="switch"></span> |