using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Pure html by Shepard</title> | |
<meta name="description" content="Site of pure html"> | |
<meta name="keywords" content="HTML, site, pure, kottans"> | |
<meta name="author" content="Shepard"> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler/capistrano' | |
set :application, "net" | |
set :repository, "[email protected]:net.git" | |
set :scm, :git | |
set :default_environment, { | |
'PATH' => "$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
require 'action_mailer' | |
class Mailer < ActionMailer::Base | |
def contact | |
mail( | |
:to => "[email protected]", | |
:from => "[email protected]", | |
:subject => "Test") do |format| | |
format.text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rake task for compiling CoffeeScript and SASS (Compass). | |
# | |
# Author: Kim Burgestrand <http://burgestrand.se/> | |
# Date: 6th October 2010 | |
# License: X11 License (MIT License) | |
# URL: http://gist.github.com/gists/613114 | |
desc "Compiles CoffeeScript using Barrista (but only if they changed)" | |
task 'coffee:compile' => :environment do | |
require 'barista' | |
abort "'#{Barista::Compiler.bin_path}' is unavailable." unless Barista::Compiler.available? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ProjectPresenter | |
NUMBER_OF_ACTIVITIES = 4 | |
attr_reader :template | |
def initialize(project, template) | |
@project = project | |
@template = template | |
end | |
def show_categories | |
template.render partial: "category", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ActiveAdmin.register Product do | |
permit_params :name, :category_id, :description, :text, :slug, :in_slider, :tag_ids => [] | |
filter :category | |
filter :base_tags | |
filter :name | |
filter :text | |
filter :created_at | |
filter :updated_at |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source :rubygems | |
gem 'shotgun', :group=>:development | |
gem 'rack-cache' | |
gem 'sinatra', :require => 'sinatra/base' | |
gem 'sinatra-support' | |
gem 'haml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Profile | |
class App < Padrino::Application | |
set :root, File.dirname(__FILE__) # Must be set | |
register Padrino::Rendering | |
register Padrino::Helpers | |
enable :sessions | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uiGmapGoogleMapApiProvider.configure({ | |
client : 'our-companys-key', | |
v: '3.17', | |
libraries: 'weather,geometry,visualization' | |
key: 'YOUR_API_KEY' | |
transport: 'http' | |
isGoogleMapsForWork: true | |
}); |
OlderNewer