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
@consideRatio
consideRatio / Krypto A.txt
Created March 16, 2015 12:54
Utmanande gåta - Krypterade meddelanden!
Krypto A: (enklare än krypto B)
--------------------------------
Alla ni som ihärdigt kämpar har chans att läsa mitt meddelande och kommer kunna hitta till den hemliga mötesplatsen!
LÄN ÖSRÖBGZÖDUÄ!
SJ RV EGOÄU RÄPPD LDU RV ÖBGZÖP ÖSRÄB, XUD ÖGJMDP! RÄP ÖUGHO DPP ÄB GU ILGURIK SZL CEIPIK ÄEEÄU LVUD RÄP HSUÄ OÖSN SZL HÄPD LVU RV KNSURÄ! KF KGUBD JÄR I CDZÄXSSÖKUVMMÄB (LPPM://KSS.KE/LT89UX) OSJ SZL OÖUIH ÄPP EIPÄP IBEGKK SJ LVU NVOP RV KNSURÄ!
BV ÖSJJÄU EIPÄ JÄBIBKDU JÄR ÄTSPIOÖD XSÖOPGHÄU CÅU DPP LNGEMD RIK DPP LIPPD LÄED BQZÖÄEB: "JÄR ÄB QTD ÖDB ÄB ÖEQHD PUG", "YÄXUSU CIBBO I DCUIÖD", "MF WIÖIMÄRID ÖDB ÄB EGUD OIK JÄU SJ XSÖOPDHO-OVXOPIPVPISBO-ÖUQMPÄUIBK".
@consideRatio
consideRatio / APIer.md
Last active August 29, 2015 14:15
Lektionsplanering - APIer - SITSNET-träff 2015

Ide

Inspirera programmeringsidéer genom användande av offentliga API'er Låt alla komma igång med triviala exempel

Mål

/* Original source: https://gist.github.com/oskarrough/914653b03d886c015320
* Modified fork: https://gist.github.com/consideRatio/761c6286158e70feaed7
*
* Working authentication with
* Firebase 2.0.x + Ember.js 1.8.1 + Ember Data Canary + EmberFire 1.3.0 + Ember CLI
* works for me! oskar@rough.dk
*
* Note: this assumes you've set up login on your Firebase,
* only handles Google and Facebook for now.
*
If I use the <script> tags to include the five libs (handlebars/jquery/bootstrap/ember/ember-data),
and remove those five from the bower.json file...
... my app fails with errors like:
Uncaught Error: Assertion Failed: The initializer 'ember-data' has already been registered (ember.js:3902)
(onLoad is included in the stack-trace)
If i on the other hand dont use the <script> tags in the index.html file, and instead include
the libraries in the bower.json file, it all works.
didInsertElement : function () {
// Hook to
this.get('controller').on('answerRight', $.proxy(this.answerRight, this));
this.get('controller').on('answerWrong', $.proxy(this.answerWrong, this));
// Focuses the start button field
$('#sse').focus();
// Relates the enter button with the add source button
$('html').keyup(function(e){
## 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
this.resource('source', { path: '/:source_id' }, function() {
this.resource('doc', { path: '/:key' }, function() {
this.resource('collection', { path: '/:key' }, function() {
this.resource('list', { path: '/:key' });
});
});
});
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?
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({
## 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...