Skip to content

Instantly share code, notes, and snippets.

View andyparsons's full-sized avatar
:octocat:
Writing a code. Just the one, for now.

Andy S. Parsons andyparsons

:octocat:
Writing a code. Just the one, for now.
View GitHub Profile
# gevent
from gevent.wsgi import WSGIServer
http_server = WSGIServer(('', port), app)
http_server.serve_forever()
# tornado
from tornado.wsgi import WSGIContainer
from tornado.httpserver import HTTPServer
from tornado.ioloop import IOLoop
http_server = HTTPServer(WSGIContainer(app))
#! /usr/bin/env python
#
# Mixpanel, Inc. -- http://mixpanel.com/
#
# Python API client library to consume mixpanel.com analytics data.
import hashlib
import urllib
import time
try:
(edx)[edx-platform] ./manage.py lms --settings dev syncdb --traceback 13:15:58 ☁ master ☀
Traceback (most recent call last):
File "./manage.py", line 90, in <module>
startup = importlib.import_module(edx_args.startup)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/Users/andyparsons/code/academy/mcka/edx-platform/lms/startup.py", line 8, in <module>
settings.INSTALLED_APPS # pylint: disable=W0104
File "/Users/andyparsons/.virtualenvs/edx/lib/python2.7/site-packages/django/conf/__init__.py", line 54, in __getattr__
self._setup(name)
Captured Task Output:
---------------------
---> pavelib.servers.devstack
---> pavelib.prereqs.install_prereqs
---> pavelib.assets.update_assets
python manage.py lms --settings=devstack preprocess_assets
Build failed running pavelib.servers.devstack: Subprocess return code: 1
(edx)[edx-platform] paver devstack lms 16:28:53 ☁ api ☂ ✖ ⚡
Verifying that +andyparsons is my openname (Bitcoin username). https://onename.io/andyparsons
@andyparsons
andyparsons / gist:d950c31753efe6342b6d
Created February 21, 2015 17:50
gropius build output
gropius|feature/frontend⚡ ⇒ lein npm run build
> [email protected] build /Users/andy/code/kontor/gropius
> cd resources/client && npm i && bower i && npm run build
npm WARN package.json [email protected] No repository field.
> [email protected] build /Users/andy/code/kontor/gropius/resources/client
> nod_modiles/.bin/webpack --config config/production.webpack.config.js --progress --colors --profile
@andyparsons
andyparsons / gist:563c7e4dab956b1c85af
Created February 15, 2016 21:44
Cloudfront Cache Miss example
https://image2.kontor.com/b3c/b3cbde31-ab14-44a6-93c2-23ea8436cd46/orig.jpg?rect=2158%2C344%2C1034%2C1034&dpr=1&fit=max&h=400&q=80&w=1
Age:1350
Cache-Control:max-age=31536000
Connection:keep-alive
Content-Type:image/jpeg
Date:Mon, 15 Feb 2016 19:32:40 GMT
Transfer-Encoding:chunked
Via:1.1 e93599ff228cc924153b1db5ec11dc55.cloudfront.net (CloudFront)
X-Amz-Cf-Id:LkTZQMFfMypK76XAwvdqtfny-Q3_XLWNt2Uyy0x3mo0pmnSQY4eTZg==
ERROR in ./~/css-loader!./~/autoprefixer-loader?{"browsers":["last 2 version","ie >= 10"]}!./~/sass-loader?outputStyle=expanded&sourceMap&includePaths[]=/Users/andyparsons/code/gropius/resources/lib/bower_components&includePaths[]=/Users/andyparsons/code/gropius/resources/lib/sass!./src/entries/app/app.scss
Module build failed:
@import "modularized-normalize-scss/normalize";
^
File to import not found or unreadable: modularized-normalize-scss/normalize
Parent style sheet: /Users/andyparsons/code/gropius/resources/lib/sass/kontor.scss
in /Users/andyparsons/code/gropius/resources/lib/sass/kontor.scss (line 5, column 1)
@ ./src/entries/app/app.scss 4:14-403 13:2-17:4 14:20-409
ERROR in ./~/css-loader!./~/autoprefixer-loader?{"browsers":["last 2 version","ie >= 10"]}!./~/sass-loader?outputStyle=expanded&sourceMap&includePaths[]=/Users/andyparsons/code/gropius/resources/lib/bower_components&includePaths[]=/Users/andyparsons/code/gropius/resources/lib/sass!./src/components/not-found/not-found.scss
-- firms
select 'UPDATE users SET product_manufacturer_id = ' || firm_id || ' WHERE id = ' || user_id || ';' FROM (
(SELECT id AS user_id, company_id, email, (SELECT SUBSTRING(email FROM POSITION('@' IN email)+1)) AS domain FROM users) u
JOIN
(SELECT id AS firm_id, email, url, (SELECT SUBSTRING(email FROM POSITION('@' IN email)+1)) AS domain FROM companies) f ON u.domain = f.domain)
WHERE f.domain != '' AND
company_id IS NOT NULL AND
f.domain != 'kontor.com' AND
f.domain != 'gmail.com'
ORDER BY user_id;
Graphics Feature Status
Canvas: Hardware accelerated
Flash: Hardware accelerated
Flash Stage3D: Hardware accelerated
Flash Stage3D Baseline profile: Hardware accelerated
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
Native GpuMemoryBuffers: Hardware accelerated
Rasterization: Hardware accelerated
Video Decode: Hardware accelerated