Moved to http://tobireif.com/posts/some_ux_maxims/ .
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var head = document.documentElement.querySelector("head"); | |
| var styleEl = document.createElement("style"); | |
| var styleStr = document.createTextNode( | |
| "#content {prop: val}" | |
| ); | |
| styleEl.appendChild(styleStr); | |
| head.appendChild(styleEl); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var styleSheets = document.styleSheets; | |
| var lastStyleSheet = styleSheets[styleSheets.length - 1]; | |
| lastStyleSheet.insertRule( | |
| "selector {prop: val}", lastStyleSheet.cssRules.length | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rubygems' | |
| require 'nokogiri' | |
| def xpath_values doc, for_each_xpath, value_xpath | |
| xslt_str = | |
| %{<xsl:stylesheet version="1.0" | |
| xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
| <!-- Not well-formed: --> | |
| <xsl:template match="/"/> |