Skip to content

Instantly share code, notes, and snippets.

View commadelimited's full-sized avatar

Andy Matthews commadelimited

View GitHub Profile
@commadelimited
commadelimited / _readme.md
Last active August 29, 2015 14:02
Application template outlet doesn't populate

With these two files in place (all dependencies met) I load the page at http://127.0.0.1:8000/ and get only the h1 (which is outside of the template). There are no errors, just emptiness. if I uncomment the renderTemplate method the content loads. On a side note, my models are not populating but I'm getting there.

My debug block:

DEBUG: Ember                          : 1.5.1 core.js:6268
DEBUG: Ember Data                     : 1.0.0-beta.8.2a68c63a core.js:6268
DEBUG: Handlebars                     : 1.3.0 core.js:6268
DEBUG: jQuery                         : 2.0.3 core.js:6268
DEBUG: ember-data-django-rest-adapter : 1.0.3 
@commadelimited
commadelimited / _readme
Last active March 18, 2016 22:24
Sass-json-vars example
Running the sass compile command results in the output listed in output.sh. Here's my current sass version:
`Sass 3.2.14 (Media Mark)`
@commadelimited
commadelimited / multi-task.js
Last active January 17, 2016 20:33
grunt-multi-task-order.js
concat: {
options: {
// separator: ''
},
colors: {
options: {
banner: 'var colors = ',
footer: ';'
},
files: {
  • Save random_wiki.py to your desktop
  • Run pip install pyquery
  • In your terminal run python wiki.py | say
  • Enjoy
@commadelimited
commadelimited / _readme.md
Last active December 16, 2015 03:40
Node.js dns.resolve "bug"?

I'm pulling company data from a file server, simon.int (dataDomain). While connected to our network via ethernet cable, or our internal wireless network I can access the file server via both browser, and via Node.js dns.resolve. If I'm outside our network I can't connect via either browser or Node's dns.resolve method (as expected). The problem arises when I connect to our internal network via VPN. I can open simon.int in a browser, I can ping it, etc. yet dns.resolve returns an error when trying to connect to it.

I feel that this is a bug, but I can't find documentation of any sort of expectation of how it should work. I'm trying to determine whether I should report it as a bug, or if my expectation of it is incorrect. I ended up getting around it by making a jQuery AJAX HEAD request just to see if the server was available or not (works great).

I'd love input on this subject, or a pointer in the right direction.

A fellow developer suggested that perhaps it amounted to the user that Node was

@commadelimited
commadelimited / _readme.md
Last active August 29, 2015 14:00
Ember Qunit Testing

I'm updating my unit tests to use the new Ember-QUnit approach and I'm running into a problem with one computed property test.

I'm trying to test that hire_date returns the correct string, but the test keeps failing with undefined is not a function. I know the setup is correct because another test, location_class, works just fine.

Can anyone offer insight as to why this is failing?

Source: 	
TypeError: undefined is not a function
    at null.<anonymous> (http://0.0.0.0:8844/app/js/application.js:146:29)
@commadelimited
commadelimited / PeopleController.js
Created April 11, 2014 13:41
Data loads, never displays
App.PeopleController = Ember.ArrayController.extend({
sortAscending: true,
sortProperties:['First', 'Last'],
init: function(){
debugger;
}
});
@commadelimited
commadelimited / _readme.md
Last active August 29, 2015 13:58
Problem running mocha tests with PhantomJS through Grunt

I'm trying to set up my unit tests so that I can run them from Grunt using mocha_phantomjs. I can run them directly from the command line with the following statement:

mocha-phantomjs /test/helpers.html

and get the following output:

 Helpers
### Keybase proof
I hereby claim:
* I am commadelimited on github.
* I am commadelimited (https://keybase.io/commadelimited) on keybase.
* I have a public key whose fingerprint is 96B5 FCF6 F592 664C 58D5 0984 B7F3 0A64 5ECE C704
To claim this, I am signing this object:
@commadelimited
commadelimited / ember-testing-promises.js
Last active August 29, 2015 13:57
ember-testing-promises
describe("reports", function () {
before(function() {
Ember.run(Social, Social.advanceReadiness);
});
afterEach(function() {
Social.reset();
});