#!/usr/bin/env bash | |
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/ | |
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c | |
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver | |
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception | |
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal | |
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04 | |
# Versions | |
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE` |
tinymce.PluginManager.add('smartquotes', function(editor) { | |
function convert(e) { | |
rootNodes = editor.dom.select("body > *"); | |
for (var i = 0; i < rootNodes.length; i++) { | |
var el = rootNodes[i]; | |
var contentEditable = editor.dom.getAttrib(el, "contenteditable"); | |
if (contentEditable !== "false") { | |
convertBlock(el); |
* { | |
font-size: 12pt; | |
font-family: monospace; | |
font-weight: normal; | |
font-style: normal; | |
text-decoration: none; | |
color: black; | |
cursor: default; | |
} |
# A simple Makefile alternative to using Grunt for your static asset compilation | |
# | |
## Usage | |
# | |
# $ npm install | |
# | |
# And then you can run various commands: | |
# | |
# $ make # compile files that need compiling | |
# $ make clean all # remove target files and recompile from scratch |
#!/usr/bin/env python | |
import requests | |
import re | |
import BeautifulSoup | |
email="destroyer@nike.com" | |
password="Destroyer3" | |
session=requests.Session() |
I've used Cucumber quite a bit on my last job. It's an excellent tool, and I believe readable tests are the way to the future. But I could never get around to write effective scenarios, or maintain the boatload of text that the suite becomes once you get to a point where you have decent coverage. On top of that, it didn't seem to take much for the suite to become really slow as tests were added.
A while ago I've seen a gist by Lachie Cox where he shows how to use RSpec and Capybara to do front-end tests. That sounded perfect for me. I love RSpec, I can write my own matchers when I need them with little code, and it reads damn nicely.
So for my Rails Rumble 2010 project, as usual, I rolled a Sinatra app and figured I should give the idea a shot. Below are my findings.
// Generate inline class names for your elements | |
// | |
// <div class="actions inset-vert-small-large"> | |
// <button type="submit">Totes click me!</button> | |
// </div> | |
// | |
// Padding | |
// --------------- | |
// pad-{item} : pad-small (padding: 10px) | |
// pad-vert-{item}-{item + 1} : pad-vert-small-large (padding: 10px 0 40px 0) |
// Configurables | |
$flexibleGridColumns: 24 !default; | |
$flexibleGridColumnWidth: 30px !default; | |
$flexibleGridGutterWidth: 18px !default; | |
// Full width of a row | |
$flexibleGridRowWidth: ($flexibleGridColumns * $flexibleGridColumnWidth) + ($flexibleGridGutterWidth * ($flexibleGridColumns - 1)); | |
// The width of a column | |
$flexibleGridGridWidth: percentage($flexibleGridColumnWidth / $flexibleGridRowWidth); |
.content-main { | |
float: none ; | |
width: 100% ; | |
} | |
.dashboard { | |
float: none ; | |
width: 100% ; | |
} |