Skip to content

Instantly share code, notes, and snippets.

View rlodina's full-sized avatar

Radu Lodina rlodina

  • Baia Mare, Romania
View GitHub Profile
@rlodina
rlodina / auth.js
Created February 18, 2014 19:37 — forked from raytiley/auth.js
var dbRef = new Firebase("https://YOUR-FIREBASE.firebaseio.com/");
export default Ember.Controller.extend({
/**
@property currentUser
@type {User}
@default null
*/
currentUser: null,

Here is a quick rundown without all the typical blah blah blah ...

Create new snippet

Create a new snippet, go to Tools > New Snippet

This step creates an empty file for you to enter your new code snippet into. It should look like the following:

<snippet>
  <content><![CDATA[
Hello, ${1:this} is a ${2:snippet}.
@rlodina
rlodina / app.js
Created February 13, 2014 14:08 — forked from batok/app.js
macro to_string {
case { _ $tok } => { return [makeValue(unwrapSyntax(#{ $tok }), #{ $tok })]; }
}
macro <. {
case { _ $vari} => {
return #{
this.get( to_string $vari )
}
}
}
/* Copyright (c) 2011 Aza Raskin
|
| Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
| documentation files (the "Software"), to deal in the Software without restriction, including
| without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
| copies of the Software, and to permit persons to whom the Software is furnished to do so, subject
| to the following conditions:
|
| The above copyright notice and this permission notice shall be included in all copies or substantial portions
| of the Software.
// Select box utilizing Select2 functionality that overrides Ember.Select;
// Define view in the same way that you would an Ember.Select view.
// Additional attributes supported are: width, allowClear, and closeOnSelect;
// Example view:
// {{ view App.Select2
// viewName="fieldValueSelect2"
// prompt="Please select a value list"
// contentBinding="controller.fieldValuesLists"
// optionLabelPath="content.name"
// optionValuePath="content.id"
@rlodina
rlodina / SpeedTest
Last active December 20, 2015 12:49
alias speedtest='wget -O /dev/null http://speedtest.wdc01.softlayer.com/downloads/test10.zip'
from: osxdaily.com
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static

Ember Router Async Facelift

The Ember router is getting number of enhancements that will greatly enhance its power, reliability, predictability, and ability to handle asynchronous loading logic (so many abilities), particularly when used in conjunction with promises, though the API is friendly enough that a deep understanding of promises is not required for the simpler use cases.

Why?

Update 5/30/13

  • transitionEvent now passed to validation hooks to simplify saving/retrying transitions (among other things).
  • Validation hooks no longer get passed a resolvedParentContexts object to lookup models on parent routes that have resolved mid transition; .modelFor is now smart enough to do this. This preserves the old API of using .modelFor to look this up.
  • Updated all examples to use the latest code.