(Create a symlink pytest for py.test)
pytest [options] [file_or_dir] [file_or_dir] ...
Help:
const puppeteer = require('puppeteer'); | |
const escapeXpathString = str => { | |
const splitedQuotes = str.replace(/'/g, `', "'", '`); | |
return `concat('${splitedQuotes}', '')`; | |
}; | |
const clickByText = async (page, text) => { | |
const escapedText = escapeXpathString(text); | |
const linkHandlers = await page.$x(`//a[contains(text(), ${escapedText})]`); |
-- Allow changing a property with by zoom-adjusted amount | |
function zoom_invariant_add(prop, amt) | |
amt = amt / 2 ^ mp.get_property_number("video-zoom") | |
mp.set_property_number(prop, mp.get_property_number(prop) + amt) | |
end | |
-- Resets the pan if the entire image would be visible | |
function zoom_check_center() | |
local zoom = mp.get_property_number("video-zoom") | |
local rot = mp.get_property_number("video-rotate") * math.pi / 180 |
This is my take on how to get up and running with NGINX, PHP-FPM, MySQL and phpMyAdmin on OSX Yosemite.
This article is adapted from the original by Jonas Friedmann. Who I just discovered is from Würzburg in Germany. A stonesthrow from where I was born ;)
Make sure you have the latest version of XCode installed. Available from the Mac App Store.
Install the Xcode Command Line Tools:
xcode-select --install
// XPath CheatSheet | |
// To test XPath in your Chrome Debugger: $x('/html/body') | |
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/ | |
// 0. XPath Examples. | |
// More: http://xpath.alephzarro.com/content/cheatsheet.html | |
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class |