Tools:
Ruby:
- Rspec - Test runner
- Capybara - browser control bindings / assertion library
- Selenium - browser abstraction and running factory
Node:
- Mocha - Test runner
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
# My attempt at generalizing a common feature among C&T sites. | |
class Transporter | |
scroll = if 'ontouchmove' of window then 'ontouchmove' else 'scroll' | |
scroll = 'scroll' | |
history.pushState ?= -> null | |
$window = $(window) | |
$document = $(document) | |
LOADER_HEIGHT = null | |
constructor: ({@content, @footer, @paths, @onPageLoad, @onPageChange}) -> |
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/bash | |
# mkdir ~/franchise | |
# mkdir ~/franchise-deploy | |
# ~/franchise/hooks/post-receive | |
GIT_WORK_TREE=$(pwd)/../franchise-deploy git checkout -f master | |
cd $(pwd)/../franchise-deploy | |
gulp sass && gulp jade && gulp coffee |
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
# Credit: http://richardconroy.blogspot.com/2010/08/capybara-reference.html | |
#Navigating | |
visit('/projects') | |
#Clicking links and buttons | |
click_link('id-of-link') # e.g. <a href="google.com" id="id-of-link">click me</a> | |
click_link('Link Text') # e.g. <a href="google.com">Link Text</a> | |
click_button('Save') | |
click('Link Text') # Click either a link or a button |
https://docs.docker.com/installation/
On OS X you can use Boot2Docker, or use Vagrant to spin up an empty Ubuntu machine (or whatever OS your production environment will run on).
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
layout: | |
hero: | |
title: eye **studio** brow | |
subtitle: lorem ipsum | |
background: background.jpg | |
modules: (modules identified by their "nav name") | |
- tutorials | |
- trends | |
- brow 101 | |
- ... |
- Got to vodkas on the main navigation.
- Click on the blue edit button next to the vodka you want to edit.
- Scroll to the bottom and change the "Activated for Locale" option to activate/deactivate.
--
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
# Without partial application. | |
ajax.get('url', (data) -> | |
map data, (item) -> | |
replace item, /_/g, '-' | |
# With partial application. | |
ajax.get('url', map(replace(/_/, '-'))) | |
#======================================== |
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
joinToPrev : -> | |
prev = messages.findOne | |
createdAt: | |
$gt: @createdAt | |
prev.from is @from and not a prev.mention |