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
#!/usr/bin/env ruby | |
require 'pry' | |
require 'pathname' | |
if ARGV.count != 3 | |
puts "usage: #{__FILE__} <TEMPLATE_IMAGE> <SOURCE_DIR> <DEST_DIR>" | |
exit(1) | |
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
require 'excon' | |
require 'json' | |
require 'uri' | |
module NestAPI | |
VERSION = '0.0.1' | |
class Default | |
def initialize(token) | |
@token = token |
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
BIN = ./node_modules/.bin | |
all: css js html | |
css: | |
mkdir -p build/ | |
$(BIN)/node-sass css/index.css.sass -o build/index.css | |
js: | |
mkdir -p build/ |
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
app = angular.module 'dashboard' | |
app.animation '.appear', [-> | |
addClass: (element, className, done) -> | |
$element = jQuery element | |
$element.removeClass className | |
$element.css 'opacity', 1 | |
$element.animate {opacity: 0}, 300, 'linear', -> | |
$element.addClass className | |
done() |
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
#!/usr/bin/env ruby | |
# | |
# End to end tests. | |
# | |
# Starts the application server and BrowserStack tunnel in the background | |
# and then runs protractor. Stops the server and tunnel after protractor | |
# finishes. | |
require 'bundler/setup' | |
require 'dotenv' |
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
exports.config = { | |
// The address of a running selenium server. | |
seleniumAddress: 'http://hub.browserstack.com/wd/hub', | |
// Capabilities to be passed to the webdriver instance. | |
capabilities: { | |
'browserName': 'chrome', | |
'browserstack.tunnel': 'true', | |
'browserstack.debug': 'true', | |
'browserstack.user' : process.env.BROWSERSTACK_USER, |
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
%div{ng: {controller: 'planner.coverImageController', init: @plan.to_json}} | |
%img{ng: {src: 'getCoverImageUrl()'}} | |
// The cloudinary directive communicates with the cover image controller through `done`. | |
// When the fileuploaddone | |
%div{cloudinary: 'true', done: 'fileDidUpload(url)', timestamp: cloudinary_info.timestamp, corscallback: cloudinary_info.cors_callback, signature: cloudinary_info.signature, apikey: cloudinary_info.api_key} |
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 (global) { | |
'use strict'; | |
var foo = function () { | |
return this; | |
}; | |
if (global.namespace === undefined) { | |
global.namespace = {}; | |
} |
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
<div ng-controller="AvatarController"> | |
<img ng-src="getImageUrl()" cloudinary open="imageDialogIsOpen" change="imageDidChange(url)"> | |
<button ng-click="openImageDialog()">Change Avatar</button> | |
</div> |
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
TimeRange.prototype.getEnd = function() { | |
var end = this.end; | |
if (end) { | |
return end; | |
} else { | |
return parseInt(this.start) + 3600 // 1 hour | |
} | |
}; |