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 'auto_reloader' | |
module RailsAutoReloader | |
def self.activate | |
AutoReloader.activate reloadable_paths: ['lib'] | |
end | |
class Middleware | |
def initialize(app) | |
@app = app |
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
using System; | |
using System.Windows.Controls; | |
using System.Windows.Media; | |
using System.Windows.Threading; | |
namespace Presentation.Helpers { | |
public static class TreeViewitemFinder { | |
public static TreeViewItem BringTreeViewItemIntoView(this TreeView treeView, TreeViewItemModel item) { | |
if (item == null) return null; |
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
import {Component, Inject, AfterViewInit} from 'angular2/core'; | |
import {upgradeAdapter} from 'upgrade_adapter'; | |
const template = require('./template.html'); | |
// Step 1: Upgrade any Angular 1.x components we depend on | |
const Dialog = upgradeAdapter.upgradeNg1Component('Dialog'); | |
// Step 2: Import any Angular 2.x components we depend on | |
import {Calendar} from '../calendar'; |
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
var facepalm = function() { | |
return { | |
replace: true, | |
template: "<pre>" | |
+ " .-'---`-.\n" | |
+ ",' `.\n" | |
+ "| \\\n" | |
+ "| \\\n" | |
+ "\\ _ \\\n" | |
+ ",\\ _ ,'-,/-)\\\n" |
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
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" | |
install_git "jamesgolick-ruby" "https://github.com/jamesgolick/ruby.git" "jamesgolick" autoconf standard verify_openssl |
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
$(function() { | |
setPageState = function(current, next) { | |
$('#content').data('page', current); | |
history.replaceState({ page: current }, null, current); | |
if(!next) return; | |
history.pushState({ page: next }, null, current); | |
history.go(-1); | |
}; | |
if (!history) return; |
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
guard 'spork', :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' } do | |
watch('config/application.rb') | |
watch('config/environment.rb') | |
watch(%r{^config/environments/.+\.rb$}) | |
watch(%r{^config/initializers/.+\.rb$}) | |
watch('Gemfile') | |
watch('Gemfile.lock') | |
watch('spec/spec_helper.rb') { :rspec } | |
watch('test/test_helper.rb') { :test_unit } | |
watch(%r{features/support/}) { :cucumber } |
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
# $ contentChanged | |
# By: Chris Nicola | |
# | |
# Provides an attachable 'contentChanged' event for text inputs and allows an | |
# event to be fired whenever changed content is detected. For convenience the | |
# event incldues properties for `previous`, `current` and `hasContent`. | |
# | |
$.fn.extend |
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
# Returns a file located in /logs/ when running locally and in the Tddium log output on Tddium | |
# This allows custom logs and files to be included in the Tddium test results | |
class Helpers | |
def self.test_log_path filename | |
if (ENV['TDDIUM_SESSION_ID']) | |
File.expand_path("#{ENV['HOME']}/results/#{ENV['TDDIUM_SESSION_ID']}/#{ENV['TDDIUM_TEST_EXEC_ID']}/") + '/' + filename | |
else | |
File.expand_path('log/') + '/' + filename | |
end |
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 CouchRest | |
module Serialization | |
extend ActiveSupport::Concern | |
include ActiveModel::Serialization | |
include ActiveModel::Serializers::JSON | |
include ActiveModel::Serializers::Xml | |
included do | |
class_attribute :include_root_in_json | |
self.include_root_in_json = false |