With a running ChromeDriver:
git clone https://gist.github.com/4805526b5dcea0897c27.git
npm install selenium-webdriver
node index.js
#!/bin/bash | |
# Partially upgrades Watai tests from v0.5 syntax to v0.6 | |
# Removes enclosing curly braces from Feature and Widget files | |
IFS=$(echo -en "\n\b") | |
for file in $(find -E "$1" -regex ".*(Feature|Widget)\.js$" -type f) | |
do | |
mv "$file" "$file~" | |
grep -v '^[{}]$' "$file~" | sed 's:^ ::g' > "$file" |
<html> | |
<head> | |
<title>Async demo</title> | |
<style> | |
body { | |
width: 100%; | |
min-height: 8em; | |
border: 1px solid red; | |
} | |
</style> |
module LocalizeHelper | |
# Wraps I18n.localize to add support for Numbers l12n. | |
# | |
# @param value [Numeric|DateTime|Time|Date] The value to localize. | |
# @return [String] The localized value. | |
# @see <https://github.com/svenfuchs/i18n/issues/135> | |
def localize(value) | |
if value.is_a?(Numeric) | |
number_with_delimiter(value, locale: I18n.locale) |
With a running ChromeDriver:
git clone https://gist.github.com/4805526b5dcea0897c27.git
npm install selenium-webdriver
node index.js
How to get thumbnails on pages
var ressourceTypes = [ | |
'aah', | |
'aeeh', | |
'af', | |
'aide_logement', | |
'allocationsChomage', | |
'allocationSecurisationPro', | |
'asf', | |
'asi', | |
'aspa', |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:template match="*"> | |
<xsl:for-each select="@format"> | |
<xsl:text>format: </xsl:text> | |
<xsl:value-of select="."/> | |
<xsl:text> | |
</xsl:text> | |
</xsl:for-each> | |
<xsl:for-each select="@type"> | |
<xsl:text>type: </xsl:text> |
Source data is Wikipedia, so I think this stuff is CC-BY-SA. If any rights are attributed to me for formatting, I waive them all. The parser itself is under WTFPL.