- 1 Overview of AngularJS (1hr)
- 1.1 AngularJS architecture overview
- 1.2 The Angular Batarang
- 1.3 Using Karma
- 1.4 Get Setup
- 1.5 Angular Seed Tour
- 1.6 Build: Hello World
- Bind tweet to input
This file contains hidden or 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 'date' | |
require 'bigdecimal/newton' | |
require 'bigdecimal/math' | |
class XIRR | |
include Newton | |
def initialize(trans) | |
@trans = trans | |
@zero = 0.to_d |
This file contains hidden or 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
# Provides angular filters for lodash or underscore functions | |
module = angular.module('_filters', []) | |
_(_).functions().each (name) -> | |
n = name | |
module.filter '_' + n, -> _[n] |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
public static bool SameAs(this BsonDocument source, BsonDocument other, params string[] ignoreFields) | |
{ | |
var elements = source.Elements.Where(x => !ignoreFields.Contains(x.Name)).ToArray(); | |
if (elements.Length == 0 && other.Elements.Where(x => !ignoreFields.Contains(x.Name)).Any()) return false; | |
foreach (var element in source.Elements) | |
{ | |
if (ignoreFields.Contains(element.Name)) continue; | |
if (!other.Names.Contains(element.Name)) return false; | |
var value = element.Value; | |
var otherValue = other[element.Name]; |