This is purposefully ambitious and aspirational. Some concepts that are worth understanding in addition to the principles outlined here include:
Here’s a CodePen I’ll periodically update with the compiled CSS to use as a testing playground.
This is purposefully ambitious and aspirational. Some concepts that are worth understanding in addition to the principles outlined here include:
Here’s a CodePen I’ll periodically update with the compiled CSS to use as a testing playground.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
# lib/capistrano/tasks/config_files.cap | |
# | |
# Capistrano task to upload configuration files outside SCM | |
# Jesus Burgos Macia | |
# | |
# This allows us to have server's config files isolated from development ones. | |
# That's useful for several reasons, but the most important is that you can | |
# ignore files from repository. | |
# | |
# The task will upload all files found in |
On the Refinery29 Mobile Web Team, codenamed "Bicycle", all of our unit tests are written using Jasmine, an awesome BDD library written by Pivotal Labs. We recently switched how we set up data for tests from declaring and assigning to closures, to assigning properties to each test case's this
object, and we've seen some awesome benefits from doing such.
Up until recently, a typical unit test for us looked something like this:
describe('views.Card', function() {
This is now a Bower package: [gist-async]. [gist-async]: https://github.com/razor-x/gist-async
Requires jQuery.
Jekyll plugin included that modifies the gist markup added by its gist Liquid tag.
Load GitHub Gists asynchronously and optionally specify which file to show.
module SortablePaginator | |
# provides helpful metrics for the paginator and mustache templates | |
def paginator_data | |
per_page = config["paginator"]["per_page"] rescue 5 | |
paginator_sort = config["paginator"]["sort"] rescue 'desc' | |
current_page = master.page_data['current_page'].to_i | |
post_count = all.length | |
page_count = (post_count.to_f/per_page).ceil | |
if paginator_sort == 'asc' |
module Ruhoh::Views::Helpers | |
module Paginator | |
# current_page is set via a compiler or previewer | |
# in which it can discern what current_page to serve | |
def paginator | |
per_page = config["paginator"]["per_page"] rescue 5 | |
current_page = master.page_data['current_page'].to_i | |
current_page = current_page.zero? ? 1 : current_page | |
offset = (current_page-1)*per_page |
=begin | |
Notes | |
===== | |
Labels: On the label you should put a "for" attribute if you're not using something like simple_form | |
This helps capybara to find your field | |
e.g. <label for="my_field_id">Some label</label> | |
=end | |
field = "Label on my field" | |
value = "existing option in list" |
We create an index with:
synonyms_expand
and synonyms_contract
synonyms_expand
and synonyms_contract
text_1
uses the synonyms_expand
analyzer at index and search timetext_2
uses the synonyms_expand
analyzer at index time, but the standard
analyzer at search timetext_3
uses the synonyms_contract
analyzer at index and search time.
# coding: utf-8 | |
# chcp 65001 | |
require 'rubygems' | |
require 'hpricot' | |
require 'nokogiri' | |
require 'fileutils' | |
require 'yaml' | |
require 'time' | |
require 'pandoc-ruby' |