Skip to content

Instantly share code, notes, and snippets.

Seven different types of CSS attribute selectors
// This attribute exists on the element
[value]
// This attribute has a specific value of cool
[value='cool']
// This attribute value contains the word cool somewhere in it
[value*='cool']
const loaderUtils = require("loader-utils");
const path = require("path");
const ruleChildren = loader =>
loader.use ||
loader.oneOf ||
(Array.isArray(loader.loader) && loader.loader) ||
[];
const findIndexAndRules = (rulesSource, ruleMatcher) => {
@PandaEox
PandaEox / loop.sh
Created June 18, 2014 10:42
Bash: Loop over regex
#!/bin/bash
# Thx to: http://mykospark.net/2014/01/iterating-through-regular-expression-matches-with-bash/
COMMENT=$1
REGEX_ISSUE_ID="([A-Z]+-[0-9]+|[0-9]{3,})"
while [[ ${COMMENT} =~ (${REGEX_ISSUE_ID}) ]]; do
echo "${BASH_REMATCH[1]}"
COMMENT=${COMMENT##*${BASH_REMATCH[1]}}
done