Skip to content

Instantly share code, notes, and snippets.

View ralphholzmann's full-sized avatar

Ralph Holzmann ralphholzmann

View GitHub Profile
class UserDetail extends Base {
render () {
let { user } = this.props;
return (
<strong>{user.name}</strong>
);
}
}
@ralphholzmann
ralphholzmann / non ternary render.jsx
Last active August 29, 2015 14:22
Ternary vs Non render functions
React.createClass({
displayName: 'SearchSuggestions',
propTypes: {
suggestions: React.PropTypes.array.required
}
renderNoSuggestions () {
return (
<h3>No suggestsions found.</h3>
vineadm/app/bower_components*
vineadm/app/scripts/lib*
vineadm/dist*
vineadm/static*
build*
deploy*
dist*
vineadm.egg-info*
tmp*

Keybase proof

I hereby claim:

  • I am ralphholzmann on github.
  • I am ralph (https://keybase.io/ralph) on keybase.
  • I have a public key whose fingerprint is 1CBE 69D7 B7B5 61DE A5EE 707D A73F CE29 B8BB EB7C

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am ralphholzmann on github.
  • I am ralph (https://keybase.io/ralph) on keybase.
  • I have a public key whose fingerprint is B323 102D F0FC 994E 941C 57AF 29BD CCE5 8476 1457

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am ralphholzmann on github.
  • I am ralph (https://keybase.io/ralph) on keybase.
  • I have a public key whose fingerprint is B323 102D F0FC 994E 941C 57AF 29BD CCE5 8476 1457

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am ralphholzmann on github.
* I am ralph (https://keybase.io/ralph) on keybase.
* I have a public key whose fingerprint is B323 102D F0FC 994E 941C 57AF 29BD CCE5 8476 1457
To claim this, I am signing this object:
something.then(function() {
throw new Error(“lel”);
}, function(error) {
// lol you think I’ll catch, but I wont
}).then(null, function(error) {
// Actually gets caught here.
console.error(error); // "lel"
});
(function ($) {
var keys = [], code = '38,38,40,40,37,39,37,39,66,65';
var konami = function (e) {
keys.push(e.which);
if (keys.length >= 11 && keys.slice(-11).toString() !== code) {
keys = [];
/* do your konami thing here */
} else if (keys.length > 11) {
keys.length = 11;
}
define(["ember"], function (Ember) {
return {
load: function(name, require, onload, config) {
require(["text!/js/templates/" + name + ".hbs"], function (template) {
Ember.TEMPLATES[name] = Ember.Handlebars.compile(template);
onload();
});
}
};
});