Skip to content

Instantly share code, notes, and snippets.

View millisami's full-sized avatar
🎯
Focusing on landing a Web3 Job

Sachin Sagar Rai millisami

🎯
Focusing on landing a Web3 Job
View GitHub Profile
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
})
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 August 29, 2015 14:04
Emberjs app using ember-cli

Building Contacto app using EmberCLI

Installation

First install Node.js. Then:

npm install -g bower
npm install -g phantomjs
@millisami
millisami / application.js
Created January 23, 2015 11:30
Access configurable values in emberjs ember-cli
# app/adapters/application.js
import DS from 'ember-data';
import config from '../config/environment';
export default DS.ActiveModelAdapter.extend({
host: config.apiUrl
});
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\]"
# 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
@millisami
millisami / git.rake
Created October 4, 2009 15:22 — forked from maxim/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:
#
@millisami
millisami / gist:217770
Created October 24, 2009 22:18 — forked from dhh/gist:45076
# 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
# 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