Skip to content

Instantly share code, notes, and snippets.

View kimroen's full-sized avatar

Kim Røen kimroen

View GitHub Profile
import Component from '@ember/component';
import { observer } from '@ember/object';
import DynamicTable from '../../mixins/ember-light-table-data-mixin';
export default Component.extend(DynamicTable, {
sort: '',
dir: '',
isLoading: true,
onDataTableLoad: observer('dataTable', function() {
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
columns: Ember.computed(function () {
return [
{
label: 'OrderId',
valuePath: 'orderId',
align: 'right',
@kimroen
kimroen / rspec_model_testing_template.rb
Last active July 9, 2022 21:45 — forked from SabretWoW/rspec_model_testing_template.rb
Rails Rspec model testing skeleton & cheat sheet using rspec-rails, shoulda-matchers, shoulda-callbacks, and factory_girl_rails. Pretty much a brain dump of examples of what you can (should?) test in a model. Pick & choose what you like, and please let me know if there are any errors or new/changed features out there. Reddit comment thread: http…
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:
#!/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..."
# ------------------------------------------------------------------------------
# FILE: ember.plugin.zsh
# DESCRIPTION: oh-my-zsh ember plugin file.
# AUTHOR: Will Meldon (wdmeldon@gmail.com)
# VERSION: 0.0.1
# ------------------------------------------------------------------------------
# Based (heavily) on composer.plugin.zsh
#
# Ember basic command completion
_ember_get_command_list () {
(function (global) {
"use strict";
function empty(obj) {
var key;
for (key in obj) if (obj.hasOwnProperty(key)) return false;
return true;
}
var Ember = global.Ember,
@kimroen
kimroen / high-dpi-media.scss
Created November 20, 2012 10:24 — forked from marcedwards/high-dpi-media.css
A Sass media query mixin that captures almost all high DPI aware devices.
/* ----------------------------------------------------------------------- */
/* */
/* Improved upon a mixin from 37signals and combined */
/* with these numbers from marc. */
/* */
/* 37signals-version: */
/* http://37signals.com/svn/posts/3271-easy-retina-ready-images-using-scss */
/* */
/* @kimroen */
/* */
@kimroen
kimroen / hack.sh
Created March 31, 2012 15:28 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#