install phantomjs
brew install phantomjs
Gemfile:
group :test do
gem 'poltergeist'
gem 'database_cleaner'
<template lang='pug'> | |
div.drop-zone(:class='{dragging: isDragging }' | |
@dragover.prevent='dragover' | |
@dragenter.prevent='dragover' | |
@drop.prevent.stop='onDrop' | |
@dragleave.prevent='dragleave') | |
div(:class='{ hidden: uploadInProgress }' @click='openFileBrowser') | |
slot | |
i {{label}} | |
input(type='file' :multiple='multiple' ref='input' style='display: none') |
# Copyright 2018 SwiftComply.com | |
commands: | |
01_node_install: | |
test: "[ `node --version` != 'v8.10.0' ]" | |
command: "curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -" | |
02_yarn_repo: | |
test: "[ ! -f /etc/yum.repos.d/yarn.repo ]" | |
command: "curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo" | |
03_yarn_install: | |
test: "[ ! -x /usr/bin/yarn ]" |
install phantomjs
brew install phantomjs
Gemfile:
group :test do
gem 'poltergeist'
gem 'database_cleaner'
PASSWORD_VALIDATOR = /( # Start of group | |
(?: # Start of nonmatching group, 4 possible solutions | |
(?=.*[a-z]) # Must contain one lowercase character | |
(?=.*[A-Z]) # Must contain one uppercase character | |
(?=.*\W) # Must contain one non-word character or symbol | |
| # or... | |
(?=.*\d) # Must contain one digit from 0-9 | |
(?=.*[A-Z]) # Must contain one uppercase character | |
(?=.*\W) # Must contain one non-word character or symbol | |
| # or... |
Web fonts are pretty much all the rage. Using a CDN for font libraries, like TypeKit or Google Fonts, will be a great solution for many projects. For others, this is not an option. Especially when you are creating a custom icon library for your project.
Rails and the asset pipeline are great tools, but Rails has yet to get caught up in the custom web font craze.
As with all things Rails, there is more then one way to skin this cat. There is the recommended way, and then there are the other ways.
Here I will show how to update your Rails project so that you can use the asset pipeline appropriately and resource your files using the common Rails convention.
gem 'kaminari' | |
gem 'ransack' |
module Taggable | |
extend ActiveSupport::Concern | |
included do | |
attr_accessible :tags | |
after_save :set_tags | |
after_destroy :unset_tags | |
end |
#Introduction
Developing Chrome Extensions is REALLY fun if you are a Front End engineer. If you, however, struggle with visualizing the architecture of an application, then developing a Chrome Extension is going to bite your butt multiple times due the amount of excessive components the extension works with. Here are some pointers in how to start, what problems I encounter and how to avoid them.
Note: I'm not covering chrome package apps, which although similar, work in a different way. I also won't cover the page options api neither the new brand event pages. What I explain covers most basic chrome applications and should be enough to get you started.
<% flash.each do |type, message| %> | |
<div class="alert <%= bootstrap_class_for(type) %> fade in"> | |
<button class="close" data-dismiss="alert">×</button> | |
<%= message %> | |
</div> | |
<% end %> |
require 'mechanize' | |
# Create a new instance of Mechanize and grab our page | |
agent = Mechanize.new | |
page = agent.get('http://robdodson.me/blog/archives/') | |
# Find all the links on the page that are contained within | |
# h1 tags. | |
post_links = page.links.find_all { |l| l.attributes.parent.name == 'h1' } |