In the following, replace example.net with your domain name. XXX.XXX.XXX.XXX is the IP of the reverse proxy.
example.net. 300 IN A XXX.XXX.XXX.XXX
| # Echo server program | |
| import socket | |
| HOST = '' # Symbolic name meaning the local host | |
| PORT = 9001 # Arbitrary non-privileged port | |
| s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
| s.bind((HOST, PORT)) | |
| s.listen(1) | |
| print "listenning on %s , port = %d"%(HOST,PORT) | |
| while 1: |
| import time | |
| import struct | |
| import socket | |
| import hashlib | |
| import sys | |
| from select import select | |
| import re | |
| import logging | |
| from threading import Thread | |
| import signal |
| import bisect | |
| import itertools | |
| import operator | |
| class _BNode(object): | |
| __slots__ = ["tree", "contents", "children"] | |
| def __init__(self, tree, contents=None, children=None): | |
| self.tree = tree |
| #!/bin/bash | |
| if [ ! -e "$1" ]; then | |
| echo "Error: Need a file to post" | |
| echo "Usage: curl_post file_to_post.file" | |
| exit 1 | |
| fi | |
| if [ -c "$1" ] | |
| then |
| // $ 6g echo.go && 6l -o echo echo.6 | |
| // $ ./echo | |
| // | |
| // ~ in another terminal ~ | |
| // | |
| // $ nc localhost 3540 | |
| package main | |
| import ( |
| # | |
| # "THE BEER-WARE LICENSE": | |
| # <truemped at goggle.com> wrote this file. As long as you retain this notice you | |
| # can do whatever you want with this stuff. If we meet some day, and you think | |
| # this stuff is worth it, you can buy me a beer in return Daniel Truemper | |
| # | |
| import time | |
| import zmq |
| #!/bin/sh | |
| # | |
| # a simple way to parse shell script arguments | |
| # | |
| # please edit and use to your hearts content | |
| # | |
| ENVIRONMENT="dev" |
| @RequestMapping(value = "handle", method = RequestMethod.GET) | |
| public void handle(HttpServletRequest request, HttpServletResponse response) throws IOException{ | |
| XContentBuilder builder = XContentFactory.contentBuilder(XContentType.JSON); | |
| SearchResponse searchResponse = buildRequest(request).execute().actionGet(); | |
| builder.startObject(); |
Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...