(Full description and list of commands at - https://npmjs.org/doc/index.html)
##List of less common (however useful) NPM commands
######Install a package and also update package.json with the installed version and package name.
| from flask import Flask, request, session | |
| from sqlalchemy import create_engine, Table, MetaData | |
| from sqlalchemy.orm import mapper, relationship, sessionmaker, scoped_session | |
| from sqlalchemy.sql import select | |
| app = Flask(__name__) | |
| engine = create_engine('postgresql+psycopg2://kamal@localhost/clinic_dev') | |
| metadata = MetaData(bind=engine) | |
| DBSession = scoped_session(sessionmaker(bind=engine)) |
| # Load balancer configuration | |
| upstream exampleApp { | |
| # Directs to the process with least number of connections. | |
| least_conn; | |
| # One failed response will take a server out of circulation for 20 seconds. | |
| server 127.0.0.1:10080 fail_timeout=20s; | |
| server 127.0.0.1:10081 fail_timeout=20s; | |
| #server 127.0.0.1:10082 fail_timeout=20s; | |
| #server 127.0.0.1:10083 fail_timeout=20s; |
(Full description and list of commands at - https://npmjs.org/doc/index.html)
##List of less common (however useful) NPM commands
######Install a package and also update package.json with the installed version and package name.
| #################################### | |
| # BASIC REQUIREMENTS | |
| # http://graphite.wikidot.com/installation | |
| # http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/ | |
| # Last tested & updated 10/13/2011 | |
| #################################### | |
| cd | |
| sudo apt-get update | |
| sudo apt-get upgrade |
A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."
| #!/usr/local/bin/python | |
| import os | |
| os.environ["PYSPARK_SUBMIT_ARGS"] = \ | |
| "--packages com.basho.riak:spark-riak-connector_2.10:1.6.0 \ | |
| pyspark-shell" | |
| import findspark, time | |
| findspark.init() |