View Jenkinsfile
This file contains 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
// Run yarn audit and only exit 0 on critical vulnerabilities (greater than 8) | |
// https://github.com/yarnpkg/yarn/blob/298e0ea6cea3ab8a610cabf28de3fdf8e7fa8d1f/src/cli/commands/audit.js#L158-L162 | |
// | |
// Credit: https://github.com/yarnpkg/yarn/issues/7260#issuecomment-506556626 | |
stage('Node dependencies') { | |
steps { | |
sh script: '/bin/bash -c "yarn audit; [[ $? -ge 8 ]] && exit 1 || exit 0"', label: "Vulnerability audit" | |
sh script: 'yarn', label: 'Install dependencies' | |
} |
View beforeAfter.html
This file contains 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
<table> | |
<tr> | |
<th><strong>Before</strong></th> | |
<th><strong>After</strong></th> | |
</tr> | |
<tr> | |
<td><img src="BEFORE" width="480" /></td> | |
<td><img src="AFTER" width="480" /></td> | |
</tr> | |
</table> |
View bottle_status_logic.js
This file contains 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
// source http://jsbin.com/mokikomobe | |
const current_bottle_weight = 1120; | |
const empty_bottle_weight = 649; | |
const full_bottle_weight = 1357; | |
const full_bottle_ml = 700; | |
const full_bottle_volume = full_bottle_weight - empty_bottle_weight; |
View BasicField.js
This file contains 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
/** | |
* Basic input field wrapped with FormField HOC | |
*/ | |
import React from 'react' | |
import PropTypes from 'prop-types' | |
import FormFieldWrapper from './FormFieldWrapper' | |
import './BasicField.css' |
View ryanair.css
This file contains 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
[core-date-range] [core-morph-popup] .content-box .footer .btn.close.disabled, | |
[core-date-range] [core-morph-popup] .content-box .footer .btn.close.disabled.active, | |
[core-date-range] [core-morph-popup] .content-box .footer .btn.close.disabled.focus, | |
[core-date-range] [core-morph-popup] .content-box .footer .btn.close.disabled:active, | |
[core-date-range] [core-morph-popup] .content-box .footer .btn.close.disabled:focus, | |
[core-date-range] [core-morph-popup] .content-box .footer .btn.close.disabled:hover, | |
[core-date-range] [core-morph-popup] .content-box .footer .btn.close[disabled], | |
[core-date-range] [core-morph-popup] .content-box .footer .btn.close[disabled].active, | |
[core-date-range] [core-morph-popup] .content-box .footer .btn.close[disabled].focus, | |
[core-date-range] [core-morph-popup] .content-box .footer .btn.close[disabled]:active, |
View gist:a66e461abae4f10032f7
This file contains 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
// Transmitter | |
var storedHeight = 0, payload; | |
setInterval(function() { | |
var currentHeight = $('.ng-scope').height(); | |
if (currentHeight == storedHeight) { | |
return false; | |
} else { | |
storedHeight = currentHeight; | |
payload = JSON.stringify({ height: currentHeight }); |
View _icons.scss
This file contains 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
// Setup an icon array of name modifer keys + content values | |
// eg. "pencil": "\e602"; becomes a class of .icon--pencil | |
$icon-types: ( | |
"pencil": "\e602", | |
"ticket": "\e60d", | |
"cart2": "\e60f", | |
"credit": "\e627", | |
"location": "\e612", | |
"map": "\e634", | |
"clock": "\e614", |
View countries.simple.json
This file contains 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
{ | |
"AF": { | |
"name": "Afghanistan" | |
}, | |
"AX": { | |
"name": "Åland Islands" | |
}, | |
"AL": { | |
"name": "Albania" | |
}, |
View countries.json
This file contains 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
{ | |
"AD": { | |
"currency": { | |
"primary": "EUR" | |
}, | |
"iso": { | |
"code2": "AD", | |
"code3": "AND", | |
"num": "020" | |
}, |
View decimalFormat.js
This file contains 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
Number.prototype.currency = function (format) { | |
var amt = this, neg; | |
// If no formatting string supplied | |
// or amount is not a number, return as is | |
if (!format || isNaN(amt)) return amt; | |
// Extract placeholders from format string | |
var formFig = format.match(/\#(.*)\#/g).pop(); | |
NewerOlder