Skip to content

Instantly share code, notes, and snippets.

Sam Breed wookiehangover

Block or report user

Report or block wookiehangover

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:7c2d385e6cb0fcdf87b2
[
{
"notes": "Just name it.",
"roundNumber": null,
"roundTitle": "Four-Letter Words",
"roundType": "Theme Round",
"round_id": 11628,
"state": "Imported",
"user_id": 30,
"virtual_round_eight": null
View gist:2a1b74ea936ab16097e1
var _ = require('underscore');
var $ = require('jquery');
var ReqMgr = function() {};
ReqMgr.prototype.ajax = function(options){
options = _.defaults(options || {}, {
// default options hurr
})
return $.ajax(options)
}
View gist:99c481b2a01f15707626
sam@daedalus: ~/dev/sprintly/sprint.ly ± [master] ✖
∴ ./snowbird/manage.py test functional 06/11/14 - 16:10:19
Tracelytics Oboe warning: module not built on a platform with liboboe and liboboe-dev installed, running in no-op mode. Tracing disabled. Contact traceviewsupport@appneta.com if this is unexpected.
[2014-06-11 22:10:29,895] ERROR oboe - Tracelytics Oboe warning: module not built on a platform with liboboe and liboboe-dev installed, running in no-op mode. Tracing disabled. Contact traceviewsupport@appneta.com if this is unexpected.
RUM initialization: couldn't read /etc/tracelytics.conf (No such file or directory). RUM will be disabled unless oboe.config['access_key'] is set.
[2014-06-11 22:10:29,896] WARNING oboe - RUM initialization: couldn't read /etc/tracelytics.conf (No such file or directory). RUM will be disabled unless oboe.config['access_key'] is set.
Creating test datab
View test_classifier.md
  • why nest another package.json / node_modules dir in test?

    • should use devDependencies and NODE_ENV=production to avoid loading tests
  • test/test/mocha.opts could probably just be in test/mocha.opts

  • forking the server and forwarding args might not be needed

    • as does the need for a Q deferred
    • exporting the server and starting / stopping in the same proc as part of the test run should be fine
  • before / after can both take done args, be async

    • as called out by the comment in test_classifier, there's some really nasty stuff going on because of this
View svg-header.js
//= require snap.svg-min
(function(){
var defaultCoordMultiplier = 50;
var shapeSpacingMultiplier = .45;
var tilt = 3;
var height = 8;
var width = 4;
var origin = { x: 0, y: 0 };
View gist:9979088
or: 'AnonymousUser' object has no attribute 'user'
[2014-04-04 17:22:52,462] ERROR django.request - Internal Server Error: /ajax/accounts/plan/list.json
Traceback (most recent call last):
File "/Users/sam/dev/sprintly/sprint.ly/src/django-ajax/ajax/decorators.py", line 61, in json_response
result = f(*args, **kwargs)
File "/Users/sam/dev/sprintly/sprint.ly/src/django-ajax/ajax/views.py", line 60, in endpoint_loader
data = endpoint(request)
File "/Users/sam/dev/sprintly/sprint.ly/src/django-ajax/ajax/endpoints.py", line 92, in list
objects = self.get_queryset(request.user)
File "/Users/sam/dev/sprintly/sprint.ly/snowbird/apps/accounts/endpoints.py", line 228, in get_queryset
View Gruntfile.coffee
config =
requirejs:
options:
mainConfigFile: 'some/path/to/your/config.js'
baseUrl: 'some/path/to/your/assets'
almond: true
optimize: 'uglify2'
wrap: false
View gist:8225458
browser.waitForElementByCssSelector('.modal-footer button', 30e3)
.delay(1000)
.then(function(elem){
return $('.modal-footer button').click();
})
...
View sprintly_setup.md

Sprintly Env Setup

git clone git@github.com:sprintly/sprint.ly.git

brew install python
brew install memcached
brew install libmemcached
brew install mysql
brew install pv
View tweeeeet.js
/*global _, moment, JST*/
jQuery.fn.tweeeeet = function(options){
"use strict";
var defaultOptions = {
screen_name: 'quickleft',
count: 10,
page: 1,
include_rts: true,
include_entities: true
You can’t perform that action at this time.