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
Trip = (startTime) -> | |
@startTime = (if startTime? then startTime else new Date().getTime()) | |
@__defineGetter__ "startInWords", -> | |
diff = (((new Date()).getTime() - (new Date(@startTime)).getTime()) / 1000) | |
dayDiff = Math.floor(diff / 86400) | |
dayDiff is 0 and (diff < 60 and "just now" or diff < 120 and "1 minute ago" or diff < 3600 and Math.floor(diff / 60) + " minutes ago" or diff < 7200 and "1 hour ago" or diff < 86400 and Math.floor(diff / 3600) + " hours ago") or dayDiff is 1 and "Yesterday" or dayDiff < 7 and dayDiff + " days ago" or Math.ceil(dayDiff / 7) + " weeks ago" | |
myTrip = new Trip() | |
tenDaysAgoTime = new Date().getTime() - ((86400 * 10) * 1000) | |
tenDaysAgoTrip = new Trip(tenDaysAgoTime) |
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
class GlobalTranz | |
has_many :carriers, through: :preferred_network | |
has_many :opportunities | |
def initialize | |
@locations = [:az, :co] | |
@revenue = true | |
@competition = nil | |
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
class GlobalTranz | |
headquarters: 'AZ', revenue: true, industryLeader: true | |
delivers: ['insight', 'passion', 'innovative products'] | |
logistics: ['technologySolutions', 'service', 'efficiency'] | |
culture: | |
workHard:true | |
recognizedSuccess:true | |
careerAdvancement:true | |
facts: | |
benefits:true |
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
********** Bootstrapped Creating a default store:1 SpotLoc:(null) SpotVerLoc:(null) occlude:0 /Volumes/Nitrous.io | |
2013-08-27 13:08:41 -0700 mds[43]: (Warning) Volume: vsd:0x7fdc6c80fe00 Open failed. failureCount:0 (null) | |
2013-08-27 13:08:58 -0700 mds[43]: (Warning) Volume: vsd:0x7fdc6a89c400 Open failed. failureCount:1 { | |
DisabledRecycleCount = 1; | |
} | |
2013-08-27 13:09:30 -0700 mds[43]: (Warning) Volume: vsd:0x7fdc6a844800 Open failed. failureCount:2 { | |
DisabledRecycleCount = 2; | |
} | |
2013-08-27 13:10:30 -0700 mds[43]: (Warning) Volume: vsd:0x7fdc6d83d000 Open failed. failureCount:3 { | |
DisabledRecycleCount = 3; |
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
[ | |
'{{repeat(10)}}', | |
{ | |
name: "{{firstName}}'s Campaign", | |
start_date: '{{date(2013-10-ddThh:mm:ss Z)}}', | |
sent: '{{numeric(214,594)}}', | |
opened: '{{numeric(143,421)}}', | |
clicked: '{{numeric(8,32)}}', | |
visits: '{{numeric(4,23)}}', | |
revenues: '{{numeric(3049,9054,%=$0,0.00)}}' |
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
# Author: Pieter Noordhuis | |
# Description: Simple demo to showcase Redis PubSub with EventMachine | |
# | |
# Update 7 Oct 2010: | |
# - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
# the WebSocket protocol implementation in the cramp gem does not work | |
# well with Chrome's (newer) WebSocket implementation. | |
# | |
# Requirements: | |
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
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
<li class="topcoat-list__item" ng-repeat="alert in alerts | orderBy:'-updateTime'"> | |
<span class='subtext'>{{ alert.updateTime | date:'MMM d h:mm a' }}</span> <b>{{ alert.type }} is {{ alert.measurement }} {{ alert.unit }}</b> | |
</li> |
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
angular.module('myApp', | |
['ngRoute', 'myApp.services', 'myApp.directives'] | |
) | |
.config(function(AWSServiceProvider) { | |
AWSServiceProvider.setArn('arn:aws:iam::<ACCOUNT_ID>:role/google-web-role'); | |
}) | |
.config(function(StripeServiceProvider) { | |
StripeServiceProvider.setPublishableKey('pk_test_YOURKEY'); | |
}) | |
.config(function($routeProvider) { |
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 friendlify = function (fn, log) { | |
var patsOnTheBack = [ | |
'you are great', | |
'you\'re the best', | |
'wow you\'re awesome' | |
]; | |
log = log || console.log; | |
return function () { | |
var args = arguments; | |
log(patsOnTheBack[Math.floor(patsOnTheBack.length * Math.random())] + '!'); |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"> | |
<script src="http://cmx.io/v/0.1/cmx.js" charset="utf-8"></script> | |
<body> | |
<div style="max-width:900px; -webkit-transform:rotate(0deg)"> | |
<scene id="scene1"> | |
<drawing t="translate(0,31)"> | |
<line stroke="green"> |