Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
| body * { | |
| -webkit-animation: fade-in 2s ease-out; | |
| animation: fade-in 2s ease-out; | |
| } |
| var source = require('vinyl-source-stream'); | |
| var gulp = require('gulp'); | |
| var gutil = require('gulp-util'); | |
| var browserify = require('browserify'); | |
| var reactify = require('reactify'); | |
| var watchify = require('watchify'); | |
| var notify = require("gulp-notify"); | |
| var scriptsDir = './scripts'; | |
| var buildDir = './build'; |
| group :development do | |
| gem 'ejs' | |
| gem 'rb-fsevent' # optional | |
| gem 'listen' | |
| end |
| #!/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 | |
| # |
| --colour | |
| -I app |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
| #!/usr/bin/env rake | |
| # Add your own tasks in files placed in lib/tasks ending in .rake, | |
| # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. | |
| #Load all the tasks in lib/tasks | |
| Dir[File.expand_path('../lib/tasks/', __FILE__) + '/*.rake'].each do |file| | |
| load file | |
| end | |
| #The original rails rakefile loading |
| class SessionsController < ApplicationController | |
| def new | |
| if member = Member.find_by_password_digest(cookies[:digest]) | |
| session[:member_id] = member.id | |
| redirect_to (session[:ref] || root_path), :notice => "Welcome back #{member.first_name}" | |
| end | |
| end | |
| def create |
| # | |
| # Put this in spec/support/ | |
| # Will use a sunspot stub session as default in all tests. | |
| # | |
| # To actually test the search you'll need something like: | |
| # describe "something", sunspot: true do | |
| # ...some tests... | |
| # end | |
| # | |
| # If you do this in your spec helper: |
| require 'benchmark' | |
| d1 = [1,1,1,1,0,0,0,0,0] | |
| d2 = [1,0,1,0,1,1,0,0,0] | |
| d3 = [0,0,0,0,1,0,1,1,1] | |
| def calc_sim vector1, vector2 |