Skip to content

Instantly share code, notes, and snippets.

View kimroen's full-sized avatar

Kim Røen kimroen

View GitHub Profile
@mutewinter
mutewinter / Bluetooth Device Toggle.md
Created September 1, 2015 19:40
An Alfred workflow to toggle the connection to Bluetooth Devices by name.

Workflow icon Bluetooth Device Toggle

Alfred Workflow to toggle bluetooth devices. I use this workflow to toggle the connection to my Bluetooth Headphones.

Download Bluetooth Device Toggle

#!/bin/bash
# Let's get some color going!
red=$'\e[1;31m'
grn=$'\e[1;32m'
end=$'\e[0m'
# cd to cwd of the script (presumably in it's proper location)
cd "$(dirname "$0")"
printf "\nInstalling Sketch templates..."
@jamesarosen
jamesarosen / ember-popover.md
Last active January 16, 2020 02:42
A Simple Ember-Popover

I looked around for a good popover library for Ember. I couldn't find one I liked (and was compatible with Ember 1.13 and Glimmer), so I whipped up a little ditty:

{{!-- app/pop-over/template.hbs --}}
{{yield}}
// app/pop-over/component.js
import $ from "jquery";
@Laurian
Laurian / styles.less
Created June 8, 2015 14:07
Atom style.less that disables Fira Code ligatures on current line, for easier editing. See it in action: http://gfycat.com/LeftRequiredCrownofthornsstarfish
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed.
*
* If you are unfamiliar with LESS, you can read more about it here:
* http://www.lesscss.org
*/
@CoralineAda
CoralineAda / open_remote_github.md
Last active April 12, 2016 13:29
Open current git repo on GitHub in a browser
@soffes
soffes / Mixpanel.swift
Last active August 30, 2016 18:47
Simple Mixpanel event tracking in Swift
// Moved to https://github.com/soffes/Mixpanel
/* objects/_card.scss */
.card {
padding: round($u-baseline / 2);
background-color: #fff;
border: 1px solid rgba(color(black), .1);
box-shadow: 0 1px 2px rgba(color(black), .1);
border-radius: 3px;
}
@samselikoff
samselikoff / future-proof.md
Last active August 15, 2024 15:17
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.

Spacegray theme for Slack

#232831,#232831,#343D47,#DFE1E8,#232831,#8EA1B4,#2B303C,#8EA1B4

@jgwhite
jgwhite / setup.js
Last active August 29, 2015 14:06
Report Ember.js routing errors in QUnit output
// By default errors thrown in route hooks log to the console.
// The router then gracefully transitions to the error substate.
// In tests we’d rather see these errors reported in QUnit’s output.
// Implementing this is easy and here’s how...
// In app/routes/application.js add:
export default Ember.Route.extend({
actions: {
error: function(error) {