Skip to content

Instantly share code, notes, and snippets.

View pixelhandler's full-sized avatar
🍊
Working remotely

Bill Heaton pixelhandler

🍊
Working remotely
View GitHub Profile
@bobholt
bobholt / normative-statements.json
Last active October 2, 2015 11:21
JSON-API Normative Statements
{
"jsonapi": {
"version": "1.0"
},
"data": [
{
"id": "content-negotiation",
"type": "sections",
"attributes": {
"title": "Content Negotiation"
@samselikoff
samselikoff / future-proof.md
Last active April 21, 2023 17:14
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.
@kristianmandrup
kristianmandrup / Converting libraries to Ember CLI addons.md
Last active April 21, 2023 17:14
Guide to Developing Addons and Blueprints for Ember CLI

Converting libraries to Ember CLI addons

In this guide we will cover two main cases:

  • Ember specific library
  • vendor library

Ember library

The Ember library will assume that Ember has already ben loaded (higher in the loading order) and thus will assume it has access to the Ember API.

@rwjblue
rwjblue / ember-master-in-ember-cli-app.md
Last active October 10, 2016 23:01
Developing on Ember master (linked locally), with an Ember CLI application.

From a terminal run the following commands:

git clone git@github.com:emberjs/ember.js
cd ember.js
npm install
npm start

While that is running open another terminal and run the following (starting from the ember.js folder you cloned a moment ago):

@intel352
intel352 / Capfile
Last active December 13, 2015 20:28
A Capistrano capfile with support for running commands locally. Additionally has a variety of helper commands for various tasks.
require 'open3'
$CR = "\033[0m" # color reset
$red = "\033[1m\033[31m"
$green = "\033[1m\033[32m"
$yellow = "\033[1m\033[33m"
$blue = "\033[1m\033[34m"
ssh_options[:forward_agent] = true
ssh_options[:paranoid] = false
@warlley
warlley / gist:3788319
Created September 26, 2012 14:17
show branch on shell
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function proml {
local RED="\[\033[0;31m\]"
local LIGHT_RED="\[\033[1;31m\]"
local YELLOW="\[\033[0;33m\]"
local LIGHT_GREEN="\[\033[1;32m\]"
local WHITE="\[\033[1;37m\]"
@dcosson
dcosson / gist:3686437
Created September 9, 2012 18:52
Compile Vim on OSX (Mountain Lion)
# default vim on osx doesn't have python, ruby support or clipboard support. These configure options add all that
# I also ran into problems using rvm ruby, had to include those libs in the LDFLAGS for vim
# Steps:
$ rvm install 1.9.1
$ rvm use 1.9.1 # vim doesn't support anything higher
$ curl ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2 | tar xj
$ cd vim73
$ ./configure --with-features=huge --enable-perlinterp=yes --enable-rubyinterp=yes --enable-pythoninterp=yes --enable-multibyte
@avit
avit / mailer.rb
Created August 25, 2012 13:35
inheritable_copy error
class MyMailer < ActionMailer::Base
def notice(user)
# ...
mail(to: @to, from: @from, subject: @subject) do |format|
format.html { render text: @html_content }
format.text { render text: @text_content }
end
end
end
@digitaljhelms
digitaljhelms / gist:3014302
Created June 28, 2012 22:08
Sublime Text 2 bash alias & CLI function to open projects without using the `.sublime-project` file extension
# bash alias
alias subl='/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl'
# bash function, usage: $ st -p [projectname] -opt2 -opt3
function st() {
if [ -n "$1" -a -n "$2" ]; then # if more than one argument
if [ "$1" = "-p" -o "$1" = "--project" ]; then # if arg1 is -p or --project
local projectfile="$2"
[[ $projectfile != *.sublime-project ]] && projectfile="$2.sublime-project" # detect if arg2 already includes the ext
if [ -e $projectfile ]; then # does project file exist?