Skip to content

Instantly share code, notes, and snippets.

View chriskrycho's full-sized avatar
🚀
Hire me! https://v5.chriskrycho.com/journal/next/role/

Chris Krycho chriskrycho

🚀
Hire me! https://v5.chriskrycho.com/journal/next/role/
View GitHub Profile
TypeError: Cannot read property 'originalMaxAge' of undefined
at Session.resetMaxAge (<path to project>/node_modules/express-session/session/session.js:58:49)
at Session.touch (<path to project>/node_modules/express-session/session/session.js:47:15)
at ServerResponse.end (<path to project>/node_modules/express-session/index.js:269:19)
at ServerResponse.send (<path to project>/node_modules/express/lib/response.js:191:8)
at ServerResponse.json (<path to project>/node_modules/express/lib/response.js:235:15)
at ServerResponse.send (<path to project>/node_modules/express/lib/response.js:134:21)
at module.exports (<path to project>/prototyping/passport-test.coffee:97:7)
at Layer.handle [as handle_request] (<path to project>/node_modules/express/lib/router/layer.js:76:5)
at next (<path to project>/node_modules/express/lib/router/route.js:100:13)
@chriskrycho
chriskrycho / g_char.h
Created January 20, 2015 19:11
This is real code I found in a file today. This is the *whole* body of the code. AGH.
void g_char(char *a, int alen, char *b)
{
char *x=a+alen-1,
*y=b+alen-1;
while (x >= a && *x == ' ')
{
x--;
y--;
}
*(y+1) = '\0';
@chriskrycho
chriskrycho / weird-pip.txt
Created April 11, 2015 03:52
The weirdest pip result I've ever seen…
~/Desktop
$ pip3 install -U pip 22:50
You are using pip version 6.0.8, however version 6.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting pip from https://pypi.python.org/packages/py2.py3/p/pip/pip-6.1.1-py2.py3-none-any.whl#md5=172eb5abab25a5e0f7a7b63c7a49378d
Using cached pip-6.1.1-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 6.0.8
Uninstalling pip-6.0.8:
Successfully uninstalled pip-6.0.8
@chriskrycho
chriskrycho / pelican-slug-issue
Last active August 29, 2015 14:21
Pelican slug sorting issue
DEBUG: Adding current directory to system path
DEBUG: Temporarily adding PLUGIN_PATHS to system path
DEBUG: Restoring system path
DEBUG: Template list: ['!simple/archives.html', '!simple/article.html', '!simple/author.html', '!simple/authors.html', '!simple/base.html', '!simple/categories.html', '!simple/category.html', '!simple/gosquared.html', '!simple/index.html', '!simple/page.html', '!simple/pagination.html', '!simple/period_archives.html', '!simple/tag.html', '!simple/tags.html', '!simple/translations.html', '404.html', 'archives.html', 'article.html', 'author.html', 'authors.html', 'base.html', 'categories.html', 'category.html', 'gosquared.html', 'includes/404-content.html', 'includes/footer.html', 'includes/id-common.html', 'includes/id-twitter.html', 'includes/item-header.html', 'index.html', 'page.html', 'pagination.html', 'period_archives.html', 'tag.html', 'tags.html', 'translations.html']
DEBUG: Read file 0-01.md -> Article
DEBUG: Signal article_generator_preread.send(ArticlesGenerator)
DEBUG: S
@chriskrycho
chriskrycho / application.controller.js
Last active February 12, 2016 16:33
Firefox Inspector DOM test
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Firefox DOM updates'
});
@chriskrycho
chriskrycho / error-services.js
Last active March 11, 2016 20:51
Ember error service with a bit of a problem.
// ----- services/error.js ----- //
import Ember from 'ember';
import ENV from "mobile-web/config/environment";
import DS from 'ember-data';
import { UnauthorizedError } from 'ember-ajax/errors';
// TODO: set this text configurably/get input from marketing/etc.?
const fooErr = "Sorry, we were unable to do that thing.";
@chriskrycho
chriskrycho / components.simple-form.js
Last active April 25, 2016 18:04
component-action
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
save(data) {
this.set('savedData', data);
this.get('after-save-action')();
}
}
});
@chriskrycho
chriskrycho / build-dump.txt
Created May 25, 2016 19:00
Windows TeamCity Ember build failure
TypeError: Path must be a string. Received null
at assertPath (path.js:8:11)
at Object.win32.resolve (path.js:130:5)
at module.exports (D:\BuildAgent\work\8afa5390471260e3\node_modules\git-repo-info\index.js:128:16)
at version (D:\BuildAgent\work\8afa5390471260e3\node_modules\git-repo-version\index.js:11:14)
at Class.module.exports.config (D:\BuildAgent\work\8afa5390471260e3\node_modules\ember-cli-app-version\index.js:10:46)
at D:\BuildAgent\work\8afa5390471260e3\node_modules\ember-cli\lib\models\project.js:223:27
at Array.reduce (native)
at Project.getAddonsConfig (D:\BuildAgent\work\8afa5390471260e3\node_modules\ember-cli\lib\models\project.js:221:22)
at Project.config (D:\BuildAgent\work\8afa5390471260e3\node_modules\ember-cli\lib\models\project.js:199:29)
import Ember from 'ember'
const setReadOnly = (context, name, value) => {
const writable = false
const configurable = false
const enumerable = true
Ember.defineProperty(context, name, { value, writable, configurable, enumerable })
}
export default Ember.Controller.extend({
import Ember from 'ember';
export default Ember.Component.extend({
bar: 42
});