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
CREATE FUNCTION JSON_UNIQ(arr JSON) RETURNS json | |
BEGIN | |
SET @arr = arr; | |
SET @a_length = JSON_LENGTH(@arr); | |
SET @loop_index = @a_length; | |
WHILE @loop_index >= 0 DO | |
SET @item = JSON_UNQUOTE(JSON_EXTRACT(@arr, concat('$[',@loop_index,']'))); |
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
{ | |
"operator": "and", | |
"expressions": [ | |
{ | |
"operator": "and", | |
"expressions": [ | |
{ | |
"field": "a", | |
"condition": { ">": 10 } | |
}, |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script src="https://cdn.jsdelivr.net/momentjs/2.14.1/moment-with-locales.min.js"></script> |
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
export function() { | |
var items = location.search.slice(1).split('&'); | |
var obj = {}; | |
items.forEach(function(item) { | |
item = item.split('='); | |
obj[item[0]] = decodeURIComponent(item[1] || ''); | |
}); | |
return JSON.parse(JSON.stringify(obj)); | |
} |
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
{ | |
"typog": [ | |
{ | |
"font-family": "Baskerville,Garamond,Georgia,Times,serif", | |
"font-size": "16px", | |
"font-weight": "700", | |
"font-variant": "normal", | |
"font-style": "normal", | |
"color": "rgb(255, 255, 255)", | |
"text-transform": "none", |
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
<form> | |
<fieldset> | |
<legend>Form Fields</legend> | |
<div> | |
<label for="text-input">Text input</label> | |
<input id="text-input" type="text"> | |
</div> | |
<div> | |
<label for="text-input-placeholder">Text input with placeholder</label> | |
<input id="text-input-placeholder" type="text" placeholder="I'm placeholder text"> |
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
/** | |
* Converts a SASS map of css property names and values into CSS output. | |
* Properties named `description` will have their value inserted as comments. | |
* | |
* Nested maps will be processed recursively. | |
* | |
* @param {map} $map the map of properties to output | |
*/ | |
@mixin map-to-props($map){ | |
@if type-of($map) == map { |
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
.a,.b,.c,.d,.e{ | |
display: block; | |
color: red; | |
} | |
.f,.g{ | |
display: inline; | |
} | |
.b,.f{ | |
color: green; | |
} |
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
/* Base element styles */ | |
// The root element | |
html { | |
// root element | |
} | |
// Sections | |
body { | |
// document body |
NewerOlder