start new:
tmux
start new with session name:
tmux new -s myname
| <VirtualHost *> | |
| ServerName example.com | |
| WSGIDaemonProcess www user=max group=max threads=5 | |
| WSGIScriptAlias / /home/max/Projekte/flask-upload/flask-upload.wsgi | |
| <Directory /home/max/Projekte/flask-upload> | |
| WSGIProcessGroup www | |
| WSGIApplicationGroup %{GLOBAL} | |
| Order deny,allow |
| # Thanks to @samsonjs for the cleaned up version: | |
| # https://gist.github.com/samsonjs/4076746 | |
| PREFIX=$HOME | |
| VERSION=1.2.3 | |
| # Install Protocol Buffers | |
| wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.bz2 | |
| tar -xf protobuf-2.4.1.tar.bz2 | |
| cd protobuf-2.4.1 |
| import struct | |
| import SocketServer | |
| from base64 import b64encode | |
| from hashlib import sha1 | |
| from mimetools import Message | |
| from StringIO import StringIO | |
| class WebSocketsHandler(SocketServer.StreamRequestHandler): | |
| magic = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' |
In Gitlab 2.6 you must edit the following files in order to send messages through a Gmail account (also applicable to Google Apps accounts).
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
| import tornado.ioloop | |
| import tornado.web | |
| class Hello(tornado.web.RequestHandler): | |
| def get(self): | |
| self.write("Hello, world") | |
| class User(tornado.web.RequestHandler): | |
| def get(self): |
| var page = require('webpage').create(); | |
| page.open('http://www.website.com/', function (status) { | |
| if (status === 'success') { | |
| captureAjaxResponsesToConsole(); | |
| } | |
| }); | |
| function captureAjaxResponsesToConsole() { | |
| // logs ajax response contents to console so sublime's onConsoleMessage can use the contents |
| var page = require('webpage').create(); | |
| // User-Agent is supported through page.settings | |
| page.settings.userAgent = 'Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25'; | |
| // This is how you set other header variables | |
| page.customHeaders = {'Referer': 'localhost'}; |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """launch small http server | |
| """ | |
| import sys | |
| try: | |
| from SimpleHTTPServer import SimpleHTTPRequestHandler | |
| except ImportError: |