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
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){
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.
/* 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.
*
@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

@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".
# UpUnet-S Connectivity script
# 1: Keeps connection alive by continious pinging
# 2: Automatically reconnects to UpUnet-S using provided username/password
# 3: Keep you informed about changes in connectivity to...
# -- Router -> UpUnet-S -> Internet -> DNS Server
# USAGE
# Install coreutils (brew install coreutils)
# Add as a function in your .bash_profile on your UNIX system
# Call by writing: upunet
@consideRatio
consideRatio / Lösa idéer
Created April 8, 2015 20:18
Framtida skola
# Läromedel, matte
Växling av språk för matteuppgifterna
Uppläsning av matteuppgifter
Stackoverflow för eleverna kring uppgifterna
Minnesteknisk stöd för översikt
Growth mindset fokus
@consideRatio
consideRatio / synonym-api-example.gs
Last active March 26, 2018 12:09
API request example from google sheets
// Use this function from a cell by writing for example getSynonyms("happy")
// TODO: Make the function return the desired amount of available synonyms.
// It is currently being limited, always returning one single synonym.
// Try returning an array of words!
function getSynonyms(word) {
try {
var response = UrlFetchApp.fetch("https://api.datamuse.com/words?rel_syn=" + word);
var data = JSON.parse(response.getContentText());
}
@consideRatio
consideRatio / keybase.md
Created April 6, 2018 07:32
keybase.md

Keybase proof

I hereby claim:

  • I am consideratio on github.
  • I am consideratio (https://keybase.io/consideratio) on keybase.
  • I have a public key ASAZwA1TTFukvIa7skAKtmIyz6zKA5b2Fp622Di15dm0ago

To claim this, I am signing this object:

{{- range .Values.netpol.namespaces }}
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-egress-to-everything-but-specified-range
namespace: {{ . }}
spec:
# WARNING: targets all pods in the namespace
# If pods were already targetted by a netpol rule, this netpol