Skip to content

Instantly share code, notes, and snippets.

Ryan Rauh rauhryan

Block or report user

Report or block rauhryan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
samselikoff /
Last active Dec 11, 2019
Future-proofing your Ember 1.x code

This post is also on my blog, since Gist doesn't support @ notifications.

Components are taking center stage in Ember 2.0. Here are some things you can do today to make the transition as smooth as possible:

  • Use Ember CLI
  • In general, replace views + controllers with components
  • Only use controllers at the top-level for receiving data from the route, and use Ember.Controller instead of Ember.ArrayController or Ember.ObjectController
  • Fetch data in your route, and set it as normal properties on your top-level controller. Export an Ember.Controller, otherwise a proxy will be generated. You can use Ember.RSVP.hash to simulate setting normal props on your controller.
View .pryrc
# Using these pry gems
# gem "pry"
# gem "pry-rails"
# gem "pry-byebug"
# gem "pry-stack_explorer"
# gem "pry-doc"
# gem "pry-state"
# gem "pry-toys"
# gem "pry-rescue"
untergeek / kibana.json
Last active Mar 27, 2019
Simple Kibana dashboard for collectd stats
View kibana.json
"title": "Collectd: Blackbox",
"services": {
"query": {
"list": {
"0": {
"query": "plugin:\"load\"",
"alias": "Load",
"color": "#7EB26D",
"id": 0,
branneman /
Last active Jan 21, 2020
Better local require() paths for Node.js

Better local require() paths for Node.js


When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions


Guide to loading/error events and substates

In addition to the techniques described in the Asynchronous Routing Guide, the Ember Router provides powerful yet overridable conventions for customizing asynchronous transitions between routes by making use of error and loading substates.

loading substates

View angular.js
// Because people can't seem to find the gist description, here is the source
// of this code, a post found in last weeks JS Weekly, it is not my code
angular.module('ui-multi-gravatar', [])
.directive('multiAvatar', ['md5', function (md5) {
return {
restrict: 'E',
link:function(scope, element, attrs) {
dahlke /
Last active May 19, 2016
Some notes on all of the talks given at jQuery Conference Austin. (September 10th & 11th 2013, [])

jQuery Conference Austin

10 Sept 2013

The State of jQuery - Dave Methvin

View alert.hbs
<div id="alert">
<div id="flash">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
passcod /
Last active Dec 21, 2015
This is really normal prototypal inheritance, and the #extend and #create methods are just there for convenience, not to hide away the magic.
Namespace.extend = (src, obj = {}) ->
if typeof obj.init is 'function'
newObj = obj.init
delete obj.init
newObj = ->
newObj.prototype = Object.create src.prototype
newObj.prototype.constructor = newObj
for prop of obj
cowboyd / gist:6299096
Created Aug 21, 2013
I did not know that.
View gist:6299096
[1] pry(main)>
=> false
[2] pry(main)>
=> false
[3] pry(main)>, :yup) {}
=> #<Proc:0x00000100a08cb8@(pry):3 (lambda)>
[4] pry(main)>, :yup) {}
=> #<Proc:0x00000100d8f468@(pry):4 (lambda)>
You can’t perform that action at this time.