486 ;486
2 numbers
dscacheutil -flushcache; sudo killall -HUP mDNSResponder |
486 ;486
2 numbers
const getIsDisabled = ({fromDate, toDate, selectedKey) => { | |
let isDisabled = true; // set the initial value to true | |
if(selectedKey === 'valueA') { | |
isDisabled = false; | |
} else if(selectedKey === 'valueB') { | |
if(fromDate) { | |
const isfromDateValid = moment(fromDate).isValid(); | |
const isfromDateGreaterThanOrEqualToToday = moment().diff(fromDate) <= 0; | |
if(isfromDateValid && isfromDateGreaterThanOrEqualToToday) { | |
isDisabled = false |
// a sample array of items. | |
const values = [ | |
'item1', | |
'item2' | |
] | |
// checkValue(item) is an async that returns true or false. | |
const promises = values.map(async(item) => checkValue(item).catch(err => err)) | |
const results = await Promise.all(results) | |
console.log(results); // ['true', 'false']; |
var fileName = 'test-450.json'; | |
var fileData; | |
var savedFileEntry = {}; | |
promise_getPersistentDirectoryEntry() | |
.then(promise_fileEntry.bind(null, fileName, { create:false })) | |
.then(save_fileEntry) | |
.then(promise_file) | |
.then(promise_fileContent) |
var filters = "" | |
$('img').toArray().forEach(iterateImageElements.bind(this)); | |
console.log(filters) | |
function iterateImageElements(){ | |
var _this = arguments[0]; | |
filters += getImagePaths.apply(_this, arguments) + "\n"; | |
} |
All Chrome Scripts here. |
/* | |
gist: https://gist.github.com/appsparkler/7ce9d5e7e607a95c483d88fabb9a611e | |
% - The percent sign represents zero, one, or multiple characters | |
_ - The underscore represents a single character | |
*/ | |
{ | |
let domain = "https://env01-author.kpmg.com"; | |
let url = `${domain}/bin/querybuilder.json`; |