###Sketch trial non stop
Open hosts files:
$ open /private/etc/hosts
Edit the file adding:
127.0.0.1 backend.bohemiancoding.com
127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com
| import json | |
| import socket | |
| s = socket.create_connection(("127.0.0.1", 5090)) | |
| s.sendall(json.dumps(({"id": 1, "method": "Hello.Hello", "params": ["hello"]}))) | |
| print s.recv(4096) |
| // Filename: HttpServer.cs | |
| // Author: Benjamin N. Summerton <define-private-public> | |
| // License: Unlicense (http://unlicense.org/) | |
| using System; | |
| using System.IO; | |
| using System.Text; | |
| using System.Net; | |
| using System.Threading.Tasks; |
###Sketch trial non stop
Open hosts files:
$ open /private/etc/hosts
Edit the file adding:
127.0.0.1 backend.bohemiancoding.com
127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com
| # Install Haxe using Brew and set the haxelib path | |
| brew install haxe | |
| haxelib setup /usr/local/Cellar/haxe/lib | |
| # Install lime | |
| haxelib install lime | |
| haxelib run lime setup | |
| # Install lime tools | |
| haxelib install format |
Head over to developer.facebook.com and create an App
On your server, create a facebook webhook that will handle facebook calls. Then create a "leadgen" webhook on you App: https://developers.facebook.com/docs/graph-api/webhooks/v2.5
| all: test libtest.so testmodule | |
| libtest.so: libtest.c | |
| $(CC) -Wall -g -fPIC -shared -o $@ $? -lc | |
| test: test_main.c libtest.o | |
| $(CC) -o $@ $? | |
| testmodule: testmodule.c | |
| python setup.py build |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <title>WebSocket Client</title> | |
| <style> | |
| #output { | |
| border: solid 1px #000; | |
| } | |
| </style> | |
| </head> |
| #!flask/bin/python | |
| from flask import Flask, jsonify, abort, request, make_response, url_for | |
| from flask.ext.httpauth import HTTPBasicAuth | |
| app = Flask(__name__, static_url_path = "") | |
| auth = HTTPBasicAuth() | |
| @auth.get_password | |
| def get_password(username): | |
| if username == 'miguel': |
| sudo apt-get install libgc-dev libpcre3-dev | |
| sudo apt-get install mesa-utils build-essential git cmake libx11-dev | |
| sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev libasound2-dev | |
| #optional but recommended | |
| sudo apt-get install sqlite3 libsqlite3-dev | |
| sudo apt-get install libgtk2.0-dev (installs a lot of dependencies) | |
| sudo apt-get install libmysqlclient-dev | |
| #end optional |