Skip to content

Instantly share code, notes, and snippets.

import Ember from 'ember';
/* global $ */
// import layout from '../templates/components/ted-select';
export default Ember.Component.extend({
// layout: layout,
classNames: 'Ted-select',
selectClassNames: null,
content: Ember.A([]),
@brenna
brenna / components.my-component.js
Last active April 19, 2016 19:22
component array sorting
import Ember from 'ember';
export default Ember.Component.extend({
content: Ember.A([]),
sortBy: null,
sortArray: Ember.computed('sortBy', function(){
if (this.get('sortBy')){
return this.get('sortBy').replace(' ', '').split(',');
}
@brenna
brenna / vibes.itermcolors
Created February 22, 2016 19:59
custom iterm colour scheme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.0</real>
<key>Green Component</key>
<real>0.0</real>

Apps

  • Chrome
  • Alfred
  • Sublime Text
  • iTerm

Command line tools

  • homebrew
set -g __fish_git_prompt_show_informative_status 1
set -g __fish_git_prompt_hide_untrackedfiles 1
set -g __fish_git_prompt_color_branch FFAF5F bold
set -g __fish_git_prompt_showupstream "informative"
set -g __fish_git_prompt_char_upstream_ahead "↑"
set -g __fish_git_prompt_char_upstream_behind "↓"
set -g __fish_git_prompt_char_upstream_prefix ""
set -g __fish_git_prompt_char_stagedstate "●"
@brenna
brenna / component.js
Last active January 5, 2016 19:39
Ember router service
import Ember from 'ember';
export default Ember.Component.extend({
router: Ember.inject.service()
// ...component stuff that uses transitionTo
});
@brenna
brenna / convertToSeconds.js
Last active August 29, 2015 14:25
convert HH:MM:SS format to seconds
convertToSeconds(niceValue){
var durations = niceValue.split(':').reverse();
return durations.reduce((prev, curr, i) => {
return Number(prev) + Number(curr) * Math.pow(60, i);
});
},
convertToSeconds('01:26:45'); //returns 5205

Keybase proof

I hereby claim:

  • I am brenna on github.
  • I am brenna (https://keybase.io/brenna) on keybase.
  • I have a public key whose fingerprint is 01BC 878A 89EC 834E B9D0 268E F1C0 957B 872A C12F

To claim this, I am signing this object:

@brenna
brenna / anon-function.sublime-snippet
Last active August 29, 2015 14:17
Sublime Text snippet - JS anonymous function
<snippet>
<content><![CDATA[
function(){
${1}
}
]]></content>
<tabTrigger>fn</tabTrigger>
<scope>source.js</scope>
</snippet>
// Block grids
// ----------------------------------
// create an n-up block grid
// works well for > n unequal height items
// use @miixn block-grid on parent elem,
// @mixin block-grid-item on children
@mixin block-grid($gutterWidth: 25){
font-size: 0; //kills inline-block ghost space
margin-left: -#{$gutterWidth}px;