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
var isMobile = { | |
Android: function() { | |
return navigator.userAgent.match(/Android/i); | |
}, | |
BlackBerry: function() { | |
return navigator.userAgent.match(/BlackBerry/i); | |
}, | |
iOS: function() { | |
return navigator.userAgent.match(/iPhone|iPad|iPod/i); | |
}, |
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
$(window.location).attr('hash'); |
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
var logValue = localStorage.getItem('CAT.Log'); | |
var log = JSON.parse(logValue || null); | |
var paymentMethodLogs = log.PaymentMethod; | |
var sendRequests = paymentMethodLogs.SendRequest.split(','); | |
var startProcesses = paymentMethodLogs.StartProcess.split(','); | |
var getResponses = paymentMethodLogs.GetResponse.split(','); | |
Date.prototype.toString = function(){ | |
var t = this; |
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
var settings = $.data($('form')[0], 'validator').settings; | |
$("form").bind("invalid-form.validate", function (form,validator) { | |
var errors = validator.numberOfInvalids(); | |
var message = "Please fix" + errors + " errors."; | |
for (var x=0;x<validator.errorList.length;x++) | |
{ | |
message += "<br/>\u25CF " + validator.errorList[x].message + 'Element:' + $(validator.errorList[x].element).attr('name'); | |
} |
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
var network = /*place data*/ | |
$.each( network.log.entries, function(index, entry){ | |
var url = entry.request.url; | |
var filename = url.substring(url.lastIndexOf('/')+1); | |
if(filename.indexOf('?')>0) | |
{ | |
filename = filename.slice(0, filename.indexOf('?')); | |
} | |
var time = entry.time.replace('.',','); |
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
param ( | |
# [string] $teamproject = $(throw "please specify a Team Project name")) | |
) | |
$arrAssemblies = @( | |
"Microsoft.TeamFoundation.Client", | |
"Microsoft.TeamFoundation.Common", | |
"Microsoft.TeamFoundation.Build.Client", | |
"Microsoft.TeamFoundation.Build.Workflow", | |
"Microsoft.TeamFoundation.VersionControl.Client" |
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
git log --pretty=format: --name-only | grep ".*\.\(js\|coffee\)" | sort | uniq -c | sort -rg | head -10 |
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
import PropTypes from 'prop-types' | |
import styled from 'styled-components' | |
const Spacer = styled.div` | |
${props => (props.top ? 'margin-top: ' + props.top * 8 + 'px' : '')}; | |
${props => (props.right ? 'margin-right: ' + props.right * 8 + 'px' : '')}; | |
${props => (props.bottom ? 'margin-bottom: ' + props.bottom * 8 + 'px' : '')}; | |
${props => (props.left ? 'margin-left: ' + props.left * 8 + 'px' : '')}; | |
${props => (props.inline ? 'display: inline-block' : '')}; | |
` |
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
Array.prototype.flatten = function () { | |
return this.reduce((list, x) => { | |
if (Array.isArray(x)) { | |
return list.concat(x.flatten()) | |
} else { | |
return list.concat(x) | |
} | |
}, []) | |
} |
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
import React from 'react' | |
import { render } from 'react-testing-library' | |
import JssProvider from 'react-jss/lib/JssProvider' | |
const generateClassName = (rule, styleSheet) => | |
`${styleSheet.options.classNamePrefix}-${rule.key}` | |
const customRender = (node, options) => { | |
return render( | |
<JssProvider generateClassName={generateClassName}> |
OlderNewer