Skip to content

Instantly share code, notes, and snippets.

View consideRatio's full-sized avatar
😍
Open Source

Erik Sundell consideRatio

😍
Open Source
  • Sundell Open Source Consulting AB
  • Sweden
  • X @e_Sundell
View GitHub Profile
C:\dev\util\proj\foo>gem install therubyracer
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing therubyracer:
ERROR: Failed to build gem native extension.
C:/Ruby200/bin/ruby.exe extconf.rb
creating Makefile
File "<string>", line 1
'import
@consideRatio
consideRatio / gist:5308953
Created April 4, 2013 09:12
section of gruntfile.coffee modified
# Regarde is frensh and means Watch
regarde:
js:
files: 'public/js/**/*.js'
tasks: ['minispade', 'livereload', 'regarde']
# coffee:
# files: 'public/coffee/**/*.coffee'
# tasks: ['clean', 'coffee', 'minispade', 'livereload', 'regarde']
@consideRatio
consideRatio / gist:5314328
Created April 4, 2013 21:03
XPT --- runside kommentarer
Grundläggande sidor att ha tillgång till:
AD 1 - AD marks+quints + Armor seals + Flat MR glyphs
AD 2 - AD marks+quints + Armor seals + Dyn MR glyphs
Kommentar:
* Använda av: ADC / JUNGLARE / TOPLANEARE
* Alla din ADC bör använda dessa, och ta Dyn MR om du möter ovanligt lite magisk skada in lanen
* Vissa junglare skulle kunna använda AD2 sidan, men oftast bäst med AS marks
* Många fysiska toplanare använder båda dessa sidor, Garen/Riven t.ex
SpeedMind.Router.map(function () {
this.resource('source', { path: '/:source_id' }, function() {
this.resource('doc', { path: '/:doc_id' }, function() {
this.resource('collection', { path: '/:collection_id' }, function() {
this.resource('list', { path: '/:list_id' });
});
});
});
grunt.registerTask('server', function (target) {
if (target === 'dist') {
return grunt.task.run(['build', 'open', 'connect:dist:keepalive']);
}
grunt.task.run([
'clean:server',
'replace:app',
'concurrent:server',
'neuter:app',
## Example JSON Response
https://script.google.com/macros/s/AKfycbxoGOEaN-sxLty1zm0GEhsOZ3Ynd0FGpdH-2xfj5x9Q/dev?id=tp0nqCXf5y4x5XYLBjfPP2g&link=true
## JSON-View plugin for chrome:
https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc
## Goal
Have my JSON populate my store with loads of data
## Question #1
Should i reformat my JSON somehow? I know for certain i want a lot of data coming in one bunch, and the natural format is for me the way it is, nested data, rather then writing list of ID's to indicate what belongs where...
SpeedMind.M = DS.Model.extend({
mms : DS.hasMany('mm'),
name : DS.attr('string')
});
SpeedMind.Mm = DS.Model.extend({
m : DS.belongsTo('m'),
name : DS.attr('string'),
mmms : DS.hasMany('mmm')
});
SpeedMind.Mmm = DS.Model.extend({
CONSOLE_LOG:
1
2
RETURNING
3
4
PROBLEM & Question:
Ember does not render anything until passing point 4, that takes considerable time, can i get it to render without waiting?
this.resource('source', { path: '/:source_id' }, function() {
this.resource('doc', { path: '/:key' }, function() {
this.resource('collection', { path: '/:key' }, function() {
this.resource('list', { path: '/:key' });
});
});
});
## Performance question
A lot of databinding is in place, coupled with the model of the controller.
I wanna make more then one change and then let the visual changes to the
databinding happen, not step by step.
Question 1: Will UI-databinding trigger step-by-step when making
changes within setupController?
Question 2: If so, is there a way to suspend such step-by-step