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
session | |
if sign_in? | |
if find_auth? && already_have_same_provider? | |
redirect_to error | |
else | |
if add_auth | |
redirect_to auth_added | |
else | |
error! |
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
using System; | |
using System.Net; | |
using System.Net.Sockets; | |
using System.Text; | |
public class UDPListener | |
{ | |
private const int listenPort = 5000; | |
private static void StartListener() |
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
import tornado.ioloop | |
import tornado.web | |
from tornado import websocket | |
class EchoWebSocket(websocket.WebSocketHandler): | |
def open(self): | |
print 'open' | |
def on_message(self, message): | |
self.write_message("echo " + 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
#!/usr/bin/env python3 | |
import sys | |
import json | |
def main(): | |
result = [] | |
for line in sys.stdin: | |
if line: | |
data = json.loads(line.strip()) |