WEB2PY 2.9 Cheat Sheet

Total Page:16

File Type:pdf, Size:1020Kb

WEB2PY 2.9 Cheat Sheet WEB2PY 2.9 Cheat Sheet Database Abstraction Layer Forms http://www.web2py.com db = DAL('sqlite://storage.sqlite',pool_size=1) form = SQLFORM(db.thing,record=None) db.define_table('thing', Field('name','string')) form = SQLFORM.factory(Field('name')) (no db) URL Parsing id = db.thing.insert(name='max') form = SQLFORM.dictform(d) (for d={...}) http://host:port/admin (admin interface) query = db.thing.name.contains('m')&(db.thing.id==1) form = SQLFORM(db.thing).process() http://host:port/app/static/file (app static file) db(query).update(name='max') if form.accepted: ... http://host:port/app/appadmin (database interface) db(query).delete() elif form.errors: ... http://host:port/app/c/f(.e)/!args?vars things = db(query).select(db.thing.ALL, app ! request.application orderby=~db.thing.name, groupby=db.thing.id c ! request.controller dictinct=True, cache=(cache.ram,60)) Grids f ! request.function thing = db.thing(id) or redirect(URL('error')) grid = SQLFORM.grid(query) e ! request.extension thing.update_record(name='max') grid = SQLFORM.smartgrid(table, linked_tables=[]) args ! request.args (list) things.export_to_csv_file(open(filename,'wb')) vars ! request.vars (dict) db.thing.import_from_csv_file(open(filename,'rb')) SQLFORM.grid( query, fields=None, field_id=None, left=None, 'c/f.e' ! response.view Field Types host ! request.env.http_host headers={}, orderby=None, searchable=True, port ! request.env.http_port string, text, boolean, integer, double, decimal(n,m), date, sortable=True, paginate=20, deletable=True, time, datetime, password, upload, blob, json, list:string, editable=True, details=True, selectable=None, Global Objects list:integer, reference table, list:reference table create=True, csv=True, links=None, ...) request.obj Field Attributes Field(fieldname, type='string', length=None, Auth application, controller, function, now, client, is_local, default=None, required=False, requires=None, @auth.requires_login() is_https, ajax, args, vars, get_vars, post_vars, ondelete='CASCADE', notnull=False, unique=False, @auth.requires_membership('groupname') env.request_method, env.path_info, env.query_string, uploadfield=True, widget=None, label=None, @auth.requires_premission('edit','tablename',id) env.http_*, env.wsgi_* comment=None, writable=True, readable=True, @auth.requires(condition) auth.(has|add|del)_membership(...) response.obj update=None, authorize=None, autodelete=False, represent=None, uploadfolder=None, auth.(has|add|del)_permission(...) status=200, view='filename.html', flash='flash me', uploadseparate=False, compute=None, ...) js = 'alert("run me")', download(request,db), Full Example stream(file), render(template,**vars) Validators models/db.py CLEANUP, CRYPT, IS_ALPHANUMERIC, IS_DATE, IS_DATETIME, from gluon.tools import * session.obj IS_DATETIME_IN_RANGE, IS_DATE_IN_RANGE, db = DAL('sqlite://storage.sqlite') connect(request,response,db,separate=False), IS_DECIMAL_IN_RANGE, IS_EMAIL, IS_EMPTY_OR, IS_EQUAL_TO, auth = Auth(db) flash, secure(), forget(), _unlock(response) IS_EXPR, IS_FLOAT_IN_RANGE, IS_GENERIC_URL, IS_HTTP_URL, auth.define_tables() IS_IMAGE, IS_INT_IN_RANGE, IS_IN_DB, IS_IN_SET, db.define_table('thing', cache IS_IN_SUBSET, IS_IPV4, IS_LENGTH, IS_LIST_OF, IS_LOWER, Field('name',requires=IS_NOT_EMPTY()), auth.signature) @cache('key',3600,cache.ram) IS_MATCH, IS_NOT_EMPTY, IS_NOT_IN_DB, IS_NULL_OR, IS_SLUG, auth.enable_record_versioning(db) # for full db auditing @cache('key',3600,cache.disk) IS_STRONG, IS_TIME, IS_UPLOAD_FILENAME, IS_UPPER, IS_URL cache.ram.clear(regex='k.*') controllers/default.py Helpers def index(): return auth.wiki() # embed a wiki T (internationalization) A, B, BEAUTIFY, BODY, BR, CAT, CENTER, CODE, COL, COLGROUP, def download(): return response.download(request,db) DIV, EM, EMBED, FIELDSET, FORM, H1, H2, H3, H4, H5, H6, HEAD, HR, def user(): return dict(form=auth) # login/etc. T('hello %(key)s',dict(key='thing')) HTML, I, IFRAME, IMG, INPUT, LABEL, LEGEND, LI, LINK, MARKMIN, T.current_languages = ['en'] (no translate) MENU, META, OBJECT, ON, OL, OPTGROUP, OPTION, P, PRE, SCRIPT, T.force('en') (use languages/en.py) @auth requires_login() SELECT, SPAN, STYLE, TABLE, TAG, TBODY, TD, TEXTAREA, TFOOT, def manage_things(): # access you data TH, THEAD, TITLE, TR, TT, UL, XHTML, XML URL, redirect, and HTTP grid = SQLFORM.grid(db.thing.created_by==auth.user.id) DIV(SPAN('hello'),_id='myid',_class='myclass') return locals() URL('function') A('link',_href=URL(...)) URL('controller','function') SPAN(A('link',callback=URL(...),delete='span')) views/default/manage things.html URL('app','controller','function') TABLE(*[TR(TD(item)) for item in [...]]) {{extend 'layout.html'}} URL('function',args=[...],vars={...}) div = DIV(SPAN('hello',_id='x')) <h1>Your things</h1> URL('function',scheme=True) (full url) div.element('span#x').append("world") {{=grid}} URL('function',user_signature=True) div.element('span#x')['_class'] = 'myclass' {{# any python between double braces}} (then use @auth.requires_signature()) DIV('1<2').xml()==DIV(XML('1&lt;2',sanitize=True)).xml() redirect(URL('index')) div = TAG.DIV(TAG.SPAN('hello',_id='x')) raise HTTP(500,'message') Copyleft 2014 Massimo Di Pierro div = TAG('<div><span id="hello">hello</span></div>') Generic views @{variable} and @{controller/function/args}""" Payment Systems generic.html {{=MARKMIN(text, Stripe generic.rss url=True,environment=dict(variable='x'), from gluon.contrib.stripe import StripeForm generic.ics extra=dict(up=lambda t:cgi.escape(t.upper())))}} form = StripeForm( generic.map # google map pk=STRIPE_PUBLISHABLE_KEY, generic.pdf # html -> pdf Login Methods sk=STRIPE_SECRET_KEY, generic.json amount=150, # (amount is in cents) generic.jsonp from gluon.contrib.login_methods.basic_auth import * auth.settings.login_methods.append( description="Nothing").process() if form.accepted: payment_id = form.response['id'] Web services basic_auth('http://server')) from gluon.tools import Service from ....ldap_auth import * Google wallet button service = service() auth.settings.login_methods.append(ldap_auth( from gluon.contrib.google_wallet import button def call(): return service() mode='ad', server='my.domain.controller', {{=button(merchant_id="123456789012345", @service.rss base_dn='ou=Users,dc=domain,dc=com')) products=[dict(name="shoes", @service.xml quantity=1, price=23.5, currency='USD', @service.json from ....pam_auth import * description="running shoes black")])}} @service.xmlrpc auth.settings.login_methods.append(pam_auth()) @service.jsonrpc @service.amfrpc3('domain') from ....openid_auth import * Deployment @service.soap('name',args={'x':int},returns={'y':int}) auth.settings.login_form = OpenIDAuth(auth) web2py.py -i ip -p port -a password @service.run web2py.py -S app -M -N -R script.py (run script) from ....email_auth import * web2py.py -S app -M -N (shell) REST auth.settings.login_methods.append( web2py.py -K app (task queue worker) @request.restful() email_auth("smtp.gmail.com:587","@gmail.com")) anyserver.py -s server (third party server) def index(): servers: bjoern, cgi, cherrypy, diesel, eventlet, fapws, flup, gevent, gnuicorn, mongrel2, paste, rocket, tornado, twisted, def GET(a,b,c): return dict() from ....browserid_account import * wsgiref def PUT(a,b,c): return dict() auth.settings.login_form = BrowserID(request, def POST(a,b,c): return dict() audience = "http://127.0.0.1:8000" Setup Scripts def DELETE(a,b,c): return dict() assertion_post_url = 'http://...//user/login') return locals() from https://github.com/web2py/web2py/tree/master/scripts from ....dropbox_account import * MARKMIN auth.settings.login_form = DropboxAccount(request, setup-scheduler-centos.sh text = """ key="...",secret="...",access_type="...", setup-web2py-centos7.sh # section url = "http://.../user/login') setup-web2py-debian-sid.sh ## subsection setup-web2py-fedora-ami.sh **bold** ''italic'' ``code``, ``what``:up from ....janrain_account import * setup-web2py-fedora.sh ----------------------------------------------- auth.settings.login_form = RPXAccount(request, setup-web2py-heroku.sh image | http://example.com/image.jpg api_key="...",domain="...", setup-web2py-nginx-uwsgi-centos64.sh audio | http://example.com/audio.mp3 url='http://.../user/login' setup-web2py-nginx-uwsgi-on-centos.sh video | http://example.com/video.mp4 setup-web2py-nginx-uwsgi-opensuse.sh iframe | embed:http://example.com/page.html from ....x509_auth import * setup-web2py-nginx-uwsgi-ubuntu.sh -------------------------------------:css_class auth.settings.login_form = X509Account() setup-web2py-ubuntu.sh.
Recommended publications
  • Access Full Issue
    ISSN 2520-2073 (print) ISSN 2521-442X (online) TRAINING, LANGUAGE AND CULTURE ‘Tell me and I forget. Teach me and I remember. Involve me and I learn’ ‒ Benjamin Franklin Vol. 4 Issue 4 2020 Issue DOI: 10.22363/2521-442X-2020-4-4 The quarterly journal published by Peoples’ Friendship University of Russia (RUDN University) ISSN 2520-2073 (print) AIMS AND SCOPE TRAINING, LANGUAGE AND CULTURE ISSN 2521-442X (online) Training, Language and Culture (TLC) is a peer-reviewed journal that aims to promote and disseminate research spanning the spectrum of language and linguistics, education and culture studies with a special focus on professional communication and professional discourse. Editorial Board of A quarterly journal published by RUDN University Training, Language and Culture invites research-based articles, reviews and editorials covering issues of relevance for the scientific and professional communities. EDITORIAL BOARD Dr Elena N. Malyuga Peoples’ Friendship University of Russia (RUDN University), Moscow, Russian Federation FOCUS AREAS Barry Tomalin Glasgow Caledonian University London, London, UK Training, Language and Culture covers the following areas of scholarly interest: theoretical and practical perspectives in language and linguistics; Dr Michael McCarthy University of Nottingham, Nottingham, UK culture studies; interpersonal and intercultural professional communication; language and culture teaching and training, including techniques and Dr Robert O’Dowd University of León, León, Spain technology, testing and assessment. Dr Elsa Huertas Barros University of Westminster, London, UK Dr Olga V. Aleksandrova Lomonosov Moscow State University, Moscow, Russian Federation LICENSING Dr Lilia K. Raitskaya Moscow State Institute of International Relations (MGIMO University), Moscow, Russian Federation All articles and book reviews published in Training, Language and Culture are licensed under a Creative Commons Attribution 4.0 International Li- Dr Alex Krouglov University College London, London, UK cense (CC BY 4.0).
    [Show full text]
  • Dynamic Web Pages with the Embedded Web Server
    Dynamic Web Pages With The Embedded Web Server The Digi-Geek’s AJAX Workbook (NET+OS, XML, & JavaScript) Version 1.0 5/4/2011 Page 1 Copyright Digi International, 2011 Table of Contents Chapter 1 - How to Use this Guide ............................................................................................................... 5 Prerequisites – If You Can Ping, You Can Use This Thing! ..................................................................... 5 Getting Help with TCP/IP and Wi-Fi Setup ............................................................................................ 5 The Study Guide or the Short Cut? ....................................................................................................... 5 C Code ................................................................................................................................................... 6 HTML Code ............................................................................................................................................ 6 XML File ................................................................................................................................................. 6 Provide us with Your Feedback ............................................................................................................. 6 Chapter 2 - The Server-Client Relationship ................................................................................................... 7 Example – An Analogy for a Normal HTML page .................................................................................
    [Show full text]
  • Spring Form Tag Library
    Spring Form Tag Library The Spring Web MVC framework provides a set of tags in the form of a tag library, which is used to construct views (web pages). The Spring Web MVC integrates Spring's form tag library. Spring's form tag accesses to the command object, and also it refers to the data our Spring controller deals with. A Command object can be defined as a JavaBean that stores user input, usually entered through HTML form is called the Command object. The Spring form tag makes it easier to develop, maintain, and read JSPs. The Spring form tags are used to construct user interface elements such as text and buttons. Spring form tag library has a set of tags such as <form> and <input>. Each form tag provides support for the set of attributes of its corresponding HTML tag counterpart, which allows a developer to develop UI components in JSP or HTML pages. Configuration – spring-form.tld The Spring form tag library comes bundled in spring-webmvc.jar. The spring- form.tld is known as Tag Library Descriptor (tld) file, which is available in a web application and generates HTML tags. The Spring form tag library must be defined at the top of the JSP page. The following directive needs to be added to the top of your JSP pages, in order to use Spring form tags from this library: <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> Here, form is the tag name prefix, which will be used for the tags from this Spring form tag library in JSP pages.
    [Show full text]
  • Lightweight Django USING REST, WEBSOCKETS & BACKBONE
    Lightweight Django USING REST, WEBSOCKETS & BACKBONE Julia Elman & Mark Lavin Lightweight Django LightweightDjango How can you take advantage of the Django framework to integrate complex “A great resource for client-side interactions and real-time features into your web applications? going beyond traditional Through a series of rapid application development projects, this hands-on book shows experienced Django developers how to include REST APIs, apps and learning how WebSockets, and client-side MVC frameworks such as Backbone.js into Django can power the new or existing projects. backend of single-page Learn how to make the most of Django’s decoupled design by choosing web applications.” the components you need to build the lightweight applications you want. —Aymeric Augustin Once you finish this book, you’ll know how to build single-page applications Django core developer, CTO, oscaro.com that respond to interactions in real time. If you’re familiar with Python and JavaScript, you’re good to go. “Such a good idea—I think this will lower the barrier ■ Learn a lightweight approach for starting a new Django project of entry for developers ■ Break reusable applications into smaller services that even more… the more communicate with one another I read, the more excited ■ Create a static, rapid prototyping site as a scaffold for websites and applications I am!” —Barbara Shaurette ■ Build a REST API with django-rest-framework Python Developer, Cox Media Group ■ Learn how to use Django with the Backbone.js MVC framework ■ Create a single-page web application on top of your REST API Lightweight ■ Integrate real-time features with WebSockets and the Tornado networking library ■ Use the book’s code-driven examples in your own projects Julia Elman, a frontend developer and tech education advocate, started learning Django in 2008 while working at World Online.
    [Show full text]
  • Dynamic Forms Guide for Faculty and Staff
    Dynamic Forms User Guide University of Miami Graduate School Dynamic Forms Basics • Basic Definitions: there are two types of form users – Initiator (student): the user who starts a form. – Co-signer (faculty and staff): a user to whom a form is routed, after the initiator has submitted the form. The co-signer may just need to review and sign the form, but in some cases, they might have to complete a section of the form. Forms may have more than one co-signer. • Dynamic Forms uses UM Single Sign-On (SSO) for every form, so there is no need for additional login credentials. For every form, all users must use their official UM email address. Therefore, all forms must be initiated by the student who is making the request and forms can only be signed by the specific co-signers to whom the form is sent (i.e. Graduate Program Directors, Associate Deans of Graduate Education, Advisors and Committee Members). • Co-signers will receive an email notification from [email protected] whenever they need to sign a form. Therefore, this email address should be added to co-signers’ safe senders’ lists to ensure the notification email does not land in junk/spam/clutter folders. To visit Dynamic Forms for any other reason, click here to go to the home page. • Signatures will appear as a timestamp with the user’s printed name and the date and time of signature. • Users will only be able to write or click on the section of the form they are allowed to fill out.
    [Show full text]
  • Javascript Create Dynamic Form and Submit
    Javascript Create Dynamic Form And Submit Chocolaty and unlaced Wait often loped some ocellations dead or staying retractively. Gustave is detectedunconjunctive Raimund and circlingresupply cuttingly her brunch while forage complacent or borate Erin lavishly. leverages and discards. Superfluid and So now an array of months to submit our form, or without any required for sharing your choice. And dynamic form and javascript create submit our form will be blank. This tutorial a quick reply and create dynamic form and javascript easily create generative social website. By creating dynamic. Are dynamic forms dynamically create form submit of functionality has loaded in javascript in one time we use. Only have created dynamically create modular units that for submit to. You create dynamic field. This dynamic forms dynamically created inputs, submit button a set. The submit information is created dynamically create forms with styling gets executed sequentially in certain situations. As they all of the submit controls at the form is an array will just had an on form editor open small ajax to create dynamic form and submit button when you for the above? What i created a repeater with form via an interface can get. Planning is interfere with React, the data project you can use policy available provide different events. It dynamically create dynamic form submit button is exactly what if so i need to update will fill a free. When you medicine to validate fields in certain rules. It dynamically create dynamic email, submit event and javascript easily manage our experience. Can observe that indicates whether stop validate trigger this does your screens for each sign up as initiated? To get started, I only need a simple form, from superficial layer and services to the UI and integration tests.
    [Show full text]
  • Uwsgi Documentation Release 1.9
    uWSGI Documentation Release 1.9 uWSGI February 08, 2016 Contents 1 Included components (updated to latest stable release)3 2 Quickstarts 5 3 Table of Contents 11 4 Tutorials 137 5 Articles 139 6 uWSGI Subsystems 141 7 Scaling with uWSGI 197 8 Securing uWSGI 217 9 Keeping an eye on your apps 223 10 Async and loop engines 231 11 Web Server support 237 12 Language support 251 13 Release Notes 317 14 Contact 359 15 Donate 361 16 Indices and tables 363 Python Module Index 365 i ii uWSGI Documentation, Release 1.9 The uWSGI project aims at developing a full stack for building (and hosting) clustered/distributed network applica- tions. Mainly targeted at the web and its standards, it has been successfully used in a lot of different contexts. Thanks to its pluggable architecture it can be extended without limits to support more platforms and languages. Cur- rently, you can write plugins in C, C++ and Objective-C. The “WSGI” part in the name is a tribute to the namesake Python standard, as it has been the first developed plugin for the project. Versatility, performance, low-resource usage and reliability are the strengths of the project (and the only rules fol- lowed). Contents 1 uWSGI Documentation, Release 1.9 2 Contents CHAPTER 1 Included components (updated to latest stable release) The Core (implements configuration, processes management, sockets creation, monitoring, logging, shared memory areas, ipc, cluster membership and the uWSGI Subscription Server) Request plugins (implement application server interfaces for various languages and platforms: WSGI, PSGI, Rack, Lua WSAPI, CGI, PHP, Go ...) Gateways (implement load balancers, proxies and routers) The Emperor (implements massive instances management and monitoring) Loop engines (implement concurrency, components can be run in preforking, threaded, asynchronous/evented and green thread/coroutine modes.
    [Show full text]
  • Cherrypy Documentation Release 8.5.1.Dev0+Ng3a7e7f2.D20170208
    CherryPy Documentation Release 8.5.1.dev0+ng3a7e7f2.d20170208 CherryPy Team February 08, 2017 Contents 1 Foreword 1 1.1 Why CherryPy?.............................................1 1.2 Success Stories..............................................2 2 Installation 5 2.1 Requirements...............................................5 2.2 Supported python version........................................5 2.3 Installing.................................................5 2.4 Run it...................................................6 3 Tutorials 9 3.1 Tutorial 1: A basic web application...................................9 3.2 Tutorial 2: Different URLs lead to different functions.......................... 10 3.3 Tutorial 3: My URLs have parameters.................................. 11 3.4 Tutorial 4: Submit this form....................................... 12 3.5 Tutorial 5: Track my end-user’s activity................................. 12 3.6 Tutorial 6: What about my javascripts, CSS and images?........................ 13 3.7 Tutorial 7: Give us a REST....................................... 15 3.8 Tutorial 8: Make it smoother with Ajax................................. 17 3.9 Tutorial 9: Data is all my life...................................... 19 3.10 Tutorial 10: Make it a modern single-page application with React.js.................. 22 3.11 Tutorial 11: Organize my code...................................... 25 4 Basics 27 4.1 The one-minute application example.................................. 28 4.2 Hosting one or more applications...................................
    [Show full text]
  • WEB2PY Enterprise Web Framework (2Nd Edition)
    WEB2PY Enterprise Web Framework / 2nd Ed. Massimo Di Pierro Copyright ©2009 by Massimo Di Pierro. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600, or on the web at www.copyright.com. Requests to the Copyright owner for permission should be addressed to: Massimo Di Pierro School of Computing DePaul University 243 S Wabash Ave Chicago, IL 60604 (USA) Email: [email protected] Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in preparing this book, they make no representations or warranties with respect to the accuracy or completeness of the contents of this book and specifically disclaim any implied warranties of merchantability or fitness for a particular purpose. No warranty may be created ore extended by sales representatives or written sales materials. The advice and strategies contained herein may not be suitable for your situation. You should consult with a professional where appropriate. Neither the publisher nor author shall be liable for any loss of profit or any other commercial damages, including but not limited to special, incidental, consequential, or other damages. Library of Congress Cataloging-in-Publication Data: WEB2PY: Enterprise Web Framework Printed in the United States of America.
    [Show full text]
  • Technology Adoption in Input-Output Networks
    A Service of Leibniz-Informationszentrum econstor Wirtschaft Leibniz Information Centre Make Your Publications Visible. zbw for Economics Han, Xintong; Xu, Lei Working Paper Technology adoption in input-output networks Bank of Canada Staff Working Paper, No. 2019-51 Provided in Cooperation with: Bank of Canada, Ottawa Suggested Citation: Han, Xintong; Xu, Lei (2019) : Technology adoption in input-output networks, Bank of Canada Staff Working Paper, No. 2019-51, Bank of Canada, Ottawa This Version is available at: http://hdl.handle.net/10419/210791 Standard-Nutzungsbedingungen: Terms of use: Die Dokumente auf EconStor dürfen zu eigenen wissenschaftlichen Documents in EconStor may be saved and copied for your Zwecken und zum Privatgebrauch gespeichert und kopiert werden. personal and scholarly purposes. Sie dürfen die Dokumente nicht für öffentliche oder kommerzielle You are not to copy documents for public or commercial Zwecke vervielfältigen, öffentlich ausstellen, öffentlich zugänglich purposes, to exhibit the documents publicly, to make them machen, vertreiben oder anderweitig nutzen. publicly available on the internet, or to distribute or otherwise use the documents in public. Sofern die Verfasser die Dokumente unter Open-Content-Lizenzen (insbesondere CC-Lizenzen) zur Verfügung gestellt haben sollten, If the documents have been made available under an Open gelten abweichend von diesen Nutzungsbedingungen die in der dort Content Licence (especially Creative Commons Licences), you genannten Lizenz gewährten Nutzungsrechte. may exercise further usage rights as specified in the indicated licence. www.econstor.eu Staff Working Paper/Document de travail du personnel 2019-51 Technology Adoption in Input-Output Networks by Xintong Han and Lei Xu Bank of Canada staff working papers provide a forum for staff to publish work-in-progress research independently from the Bank’s Governing Council.
    [Show full text]
  • NGINX-Conf-2018-Slides Rawdat
    Performance Tuning NGINX Name: Amir Rawdat Currently: Technical Marketing Engineer at NGINX inc. Previously: - Customer Applications Engineer at Nokia inc. Multi-Process Architecture with QPI Bus Web Server Topology wrk nginx Reverse Proxy Topology wrk nginx nginx J6 Technical Specifications # Sockets # Cores # Model RAM OS NIC per Threads Name Socket per Core Client 2 22 2 Intel(R) 128 GB Ubuntu 40GbE Xeon(R) CPU Xenial QSFP+ E5-2699 v4 @ 2.20GHz Web Server 2 24 2 Intel(R) 192 GB Ubuntu 40GbE Xeon(R) & Platinum Xenial QSFP+ Reverse 8168 CPU @ Proxy 2.70GHz Multi-Processor Architecture #1 Duplicate NGINX Configurations J9 Multi-Processor Architecture NGINX Configuration (Instance 1) user root; worker_processes 48 ; worker_cpu_affinity auto 000000000000000000000000111111111111111111111111000000000000000000000000111111111111111111111111; worker_rlimit_nofile 1024000; error_log /home/ubuntu/access.error error; ….. ……. J11 NGINX Configuration (Instance 2) user root; worker_processes 48 ; worker_cpu_affinity auto 111111111111111111111111000000000000000000000000111111111111111111111111000000000000000000000000; worker_rlimit_nofile 1024000; error_log /home/ubuntu/access.error error; ……. ……. J12 Deploying NGINX Instances $ nginx –c /path/to/configuration/instance-1 $ nginx –c /path/to/configuration/instance-2 $ ps aux | grep nginx nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx_0.conf nginx: worker process nginx: worker process nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx_1.conf nginx: worker process nginx: worker process
    [Show full text]
  • Bepasty Documentation Release 0.3.0
    bepasty Documentation Release 0.3.0 The Bepasty Team (see AUTHORS file) Jul 02, 2019 Contents 1 Contents 3 1.1 bepasty..................................................3 1.2 Using bepasty’s web interface......................................4 1.3 Using bepasty with non-web clients...................................6 1.4 Quickstart................................................7 1.5 Installation tutorial with Debian, NGinx and gunicorn......................... 10 1.6 ChangeLog................................................ 12 1.7 The bepasty software Project....................................... 14 1.8 License.................................................. 14 1.9 Authors.................................................. 15 Index 17 i ii bepasty Documentation, Release 0.3.0 bepasty is like a pastebin for every kind of file (text, image, audio, video, documents, . ). You can upload multiple files at once, simply by drag and drop. Contents 1 bepasty Documentation, Release 0.3.0 2 Contents CHAPTER 1 Contents 1.1 bepasty bepasty is like a pastebin for all kinds of files (text, image, audio, video, documents, . , binary). The documentation is there: http://bepasty-server.readthedocs.org/en/latest/ 1.1.1 Features • Generic: – you can upload multiple files at once, simply by drag and drop – after upload, you get a unique link to a view of each file – on that view, we show actions you can do with the file, metadata of the file and, if possible, we also render the file contents – if you uploaded multiple files, you can create a pastebin with the list
    [Show full text]