Skip to content

Instantly share code, notes, and snippets.

View tofumatt's full-sized avatar

Matthew Riley MacPherson tofumatt

View GitHub Profile
django.request:ERROR Internal Server Error: /api/auth/sign-in/ :/opt/rh/python27/root/usr/lib/python2.7/site-packages/django/core/handlers/base.py:256
Traceback (most recent call last):
File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
return view_func(*args, **kwargs)
File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view
return self.dispatch(request, *args, **kwargs)
File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/rest_framework/views.py", line 452, in dispatch
response = self.handle_exception(exc)
npm install
npm http GET https://registry.npmjs.org/uglify-js
npm http GET https://registry.npmjs.org/acorn/0.4.0
npm http GET https://registry.npmjs.org/clean-css
npm http GET https://registry.npmjs.org/less
npm http GET https://registry.npmjs.org/stylus
npm http GET https://registry.npmjs.org/commonplace/0.2.4
npm http 200 https://registry.npmjs.org/uglify-js
npm http GET https://registry.npmjs.org/uglify-js/-/uglify-js-2.4.24.tgz
npm http 200 https://registry.npmjs.org/acorn/0.4.0
Environment:
Request Method: GET
Request URL: http://192.168.99.101:8000/en-GB/firefox/
Django Version: 1.6.11
Python Version: 2.7.5
Installed Applications:
('olympia',
python manage.py compress_assets
/bin/sh: /code/node_modules/less/bin/lessc: Permission denied
/code/node_modules/less/bin/lessc /code/static/css/impala/tooltips.less /code/static/css/impala/tooltips.less.css exited with a non-zero status.
/bin/sh: /code/node_modules/less/bin/lessc: Permission denied
/code/node_modules/less/bin/lessc /code/static/css/zamboni/docs.less /code/static/css/zamboni/docs.less.css exited with a non-zero status.
/bin/sh: /code/node_modules/less/bin/lessc: Permission denied
/code/node_modules/less/bin/lessc /code/static/css/impala/developers.less /code/static/css/impala/developers.less.css exited with a non-zero status.
/bin/sh: /code/node_modules/less/bin/lessc: Permission denied
/code/node_modules/less/bin/lessc /code/static/css/impala/personas.less /code/static/css/impala/personas.less.css exited with a non-zero status.
/bin/sh: /code/node_modules/less/bin/lessc: Permission denied
var foo = "m";
foo += "o";
foo += "zIndexedDB";
// Not allowed!
var myDatabase = window[foo];
@tofumatt
tofumatt / bad.js
Last active October 5, 2015 23:39
var m = "m";
var o = "o";
var z = "z";
var idb = "IndexedDB";
var tricksterVariable = m + o + z + idb;
var myDatabase = window[tricksterVariable];
module.exports = function(context) {
var variables = {};
return {
Identifier: function(node) {
// Start tracking a variable; it might be used to create an identifier
// we don't allow.
if (node.parent.type === 'VariableDeclarator') {
variables[node.name] = {
ops: 0,
reported: false,
~/Projects/addons-validator[use-terminal-width❗ ]% bin/addons-validator tests/example.xpi --stack=true
RangeError: Maximum call stack size exceeded
at String.replace (native)
at RegExp.<anonymous> (/Users/matt/Projects/addons-validator/dist/webpack:/~/babel-core/~/core-js/modules/$.fix-re-wks.js:15:31)
at String.replace (/Users/matt/Projects/addons-validator/dist/webpack:/~/babel-core/~/core-js/modules/es6.regexp.replace.js:9:1)
at module.exports (/Users/matt/Projects/addons-validator/node_modules/columnify/node_modules/strip-ansi/index.js:5:39)
at module.exports (/Users/matt/Projects/addons-validator/node_modules/columnify/width.js:5:18)
at splitLongWords (/Users/matt/Projects/addons-validator/node_modules/columnify/utils.js:117:7)
at splitLongWords (/Users/matt/Projects/addons-validator/node_modules/columnify/utils.js:137:10)
at splitLongWords (/Users/matt/Projects/addons-validator/node_modules/columnify/utils.js:137:10)
@tofumatt
tofumatt / a-new-validator.md
Last active November 22, 2015 20:10
Add-ons Draft Post

NOTE: I wrote this on WordPress.com and would've put it in the add-ons blog as a draft to review, but I am having some LDAP error and can't publish it there. So here it is for review, let me know!

A New Firefox Addons Validator

The state of add-ons has changed a lot over the past five years, with Jetpack add-ons rising in popularity and Web Extensions on the horizon. Our validation process hasn't changed as much as the ecosystem it validates, so today Mozilla is announcing its new Add-ons Validator, written in JS and available for testing today!

How the Add-ons Validator Fits in to Firefox

Add-ons are a huge part of the Firefox system and a fantastic reason to use Firefox. We already have [NUMBER OF ADDONS] available and with work underway to allow Web Extensions in Firefox, we'll see a lot more soon. For add-ons to be listed on the Firefox Add-ons site, they need to be reviewed and approved by Mozi

@tofumatt
tofumatt / reconnect-to-servers.applescript
Created January 2, 2016 20:09
Applescript App to check connection status to NAS and reconnect every 30 seconds
tell application "Finder"
set serverName to "Bookshelf"
set mediaName to "Media"
set publicName to "Public"
set isConnectedToMedia to disk mediaName exists
set isConnectedToPublic to disk publicName exists
end tell
if isConnectedToMedia = false then
try
mount volume mediaName on server serverName