Skip to content

Instantly share code, notes, and snippets.

View store.coffee
env = require 'config/environment'
if env.isDevelopment()
window.App.ApplicationAdapter = DS.RESTAdapter.extend({
host: 'http://localhost:3000'
})
else if env.isTest()
window.App.ApplicationAdapter = DS.FixtureAdapter.extend({
simulateRemoteResponse: false
})
View npm log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/0.10.5/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli 'ember-cli' ]
2 info using npm@1.2.18
3 info using node@v0.10.5
4 verbose read json /usr/local/share/npm/lib/package.json
5 verbose read json /usr/local/share/npm/lib/package.json
@millisami
millisami / emberjs-with-ember-cli.md
Last active Aug 29, 2015
Emberjs app using ember-cli
View emberjs-with-ember-cli.md

Building Contacto app using EmberCLI

Installation

First install Node.js. Then:

npm install -g bower
npm install -g phantomjs
@millisami
millisami / application.js
Created Jan 23, 2015
Access configurable values in emberjs ember-cli
View application.js
# app/adapters/application.js
import DS from 'ember-data';
import config from '../config/environment';
export default DS.ActiveModelAdapter.extend({
host: config.apiUrl
});
View gist:116327
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
BLUE="\[\033[0;34m\]"
LIGHT_RED="\[\033[1;31m\]"
LIGHT_GREEN="\[\033[1;32m\]"
WHITE="\[\033[1;37m\]"
LIGHT_GRAY="\[\033[0;37m\]"
COLOR_NONE="\[\e[0m\]"
View delayed_job.monitrc.example
# an example Monit configuration file for delayed_job
#
# To use:
# 1. copy to /var/www/apps/{app_name}/shared/delayed_job.monitrc
# 2. replace {app_name} and {environment} as appropriate
# 3. add this to your /etc/monit/monitrc
#
# include /var/www/apps/{app_name}/shared/delayed_job.monitrc
check process delayed_job with pidfile /var/www/apps/{app_name}/shared/pids/delayed_job.pid
View git.rake
# Rake tasks for managing git plugins with submodules.
#
# These tasks aim to make life simpler by automating all the boring work.
# What you get:
# - complete git integration (all you need to know is install, uninstall and update)
# - complete github integration (only use author name + plugin name)
# - rails plugin hooks (install.rb/uninstall.rb) are taken care of
#
# Available commands:
#
View gist:217770
# 1) Point *.example.com in your DNS setup to your server.
#
# 2) Setup an Apache vhost to catch the star pointer:
#
# <VirtualHost *:80>
# ServerName example.com
# ServerAlias *.example.com
# </VirtualHost>
#
# 3) Set the current account from the subdomain
View pickle_extra_steps.rb
# destroy all objects
Given(/^no #{capture_plural_factory} exist$/) do |plural_factory|
plural_factory.classify.constantize.destroy_all
# you could add the following to verify that there are indeed no records
find_models(plural_factory.singularize).should be_nil
end