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
from django.core.serializers.json import DjangoJSONEncoder | |
from django.template import Library | |
from json import dumps as json_dumps | |
register = Library() | |
@register.filter | |
def json(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
#!/opt/local/bin/python3.2 | |
# -*- encoding: utf-8 -*- | |
import sys | |
import json | |
sys.path.append('.../myfreeling/APIs/python') | |
import freeling | |
import codecs | |
import re |
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
angular.module('MyApp').factory('MyService', ['$q', function($q) { | |
// We return this object to anything injecting our service | |
var Service = {}; | |
// Keep all pending requests here until they get responses | |
var callbacks = {}; | |
// Create a unique callback ID to map requests to responses | |
var currentCallbackId = 0; | |
// Create our websocket object with the address to the websocket | |
var ws = new WebSocket("ws://localhost:8000/socket/"); | |
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
jQuery Touch Gestures ported from QUOjs | |
@see http://quojs.tapquo.com/ | |
Version 1.1 | |
-- @add singleTap event | |
-- @fix doubleTap event | |
-- @fix hold event |
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
// http://www.ietf.org/rfc/rfc1928.txt | |
// Tested with: curl http://www.google.se/ --socks5 1080 --proxy-user foo:bar | |
var States = { | |
CONNECTED:0, | |
VERIFYING:1, | |
READY:2, | |
PROXY: 3 | |
}; |
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
<?xml version="1.0"?> | |
<!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd"> | |
<!-- Policy file for xmlsocket://socks.example.com --> | |
<cross-domain-policy> | |
<!-- This is a master socket policy file --> | |
<!-- No other socket policies on the host will be permitted --> | |
<site-control permitted-cross-domain-policies="master-only"/> |