Skip to content

Instantly share code, notes, and snippets.

@geokat
geokat / comment_server.go
Created February 18, 2016 20:43
A comment server written in Golang for the FB react.js tutorial
// A comment server for the FB react.js tutorial at:
// https://facebook.github.io/react/docs/tutorial.html
package main
import (
"encoding/json"
"io/ioutil"
"log"
"net/http"
package main
import (
"encoding/csv"
"os"
"fmt"
"strconv"
"strings"
"time"
)
var wrapped_postComment_onSuccess = Dsq.Templates.postComment_onSuccess;
Dsq.Templates.postComment_onSuccess = function() {
try {
var YWATracker = YWA.getTracker("10001299646087");
YWATracker.setAction("02");
YWATracker.submit_action();
} catch(e) {}
if ($('disqus-share').checked) {
var activity = new RPXNOW.Social.Activity("Share your comment",
import os
import urllib
from django.utils import simplejson
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db
from google.appengine.api import urlfetch
from google.appengine.ext.webapp import template