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
const sleep = (t) => new Promise((resolve, reject) => { | |
setTimeout(resolve, t); | |
}); | |
(async () => { | |
$('a[data-selected-links*=key_links_settings]').click(); | |
await sleep(3000); | |
document.querySelectorAll('summary.btn-danger')[2].click(); | |
await sleep(3000); | |
const name = document.querySelectorAll('.Box-body.overflow-auto p strong')[2].textContent; |
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
const toMs = (h, m) => { | |
let ms = 0; | |
ms += h * 60 * 60 * 1000; | |
ms += m * 60 * 1000; | |
return ms; | |
} | |
export const isInTimeRange = (from, to, date = new Date()) => { | |
const d = toMs(date.getUTCHours(), date.getUTCMinutes()); | |
const start = toMs(from.hours, from.mins); |
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
const nonUniqueArr = [1,2,3,4,5,4,3,5,6]; | |
const indexOfUnique = (arr) => arr | |
.filter((item, index, a) => a.indexOf(item) === index); | |
const newSetUnique = (arr) => [...new Set(arr)]; | |
const fromUnique = (arr) => Array.from(new Set(arr)); | |
const seenUnique = (arr) => { |
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
Module Size Used by | |
btusb 36864 0 | |
btrtl 16384 1 btusb | |
btbcm 16384 1 btusb | |
btintel 16384 1 btusb | |
bluetooth 323584 5 btbcm,btrtl,btusb,btintel | |
binfmt_misc 16384 1 | |
mwifiex_usb 20480 0 | |
mwifiex 196608 1 mwifiex_usb | |
cfg80211 348160 1 mwifiex |
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 http = require('http'), | |
express = require('express'), | |
httpProxy = require('http-proxy'), | |
url = require('url'); | |
var selects = []; | |
var simpleselect = {}; | |
simpleselect.query = 'body'; |
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 i = 0; | |
while (true) { | |
if ((i <= 9) === false) break; | |
console.log(i); | |
i = i + 1; | |
} | |
// put your evil code to break the loop here: | |
// … |
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
javascript:(function(){var body=document.getElementsByTagName('body')[0];var script=document.createElement('script');script.type='text/javascript';script.src='https://s3.amazonaws.com/s3.mathisonian.com/javascripts/requirify-browser.js';body.appendChild(script);})(); |
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
new Test('Hello World', 200); // try to change offset | |
function Test(str, offset) { | |
var i = 0; | |
var $search = $('.sel-search-input'); | |
$search.val('').focus(); | |
(function next() { | |
setTimeout(function() { | |
if (i >= str.length) return; |
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
$('a.pdf').each(function(_,i) { | |
var i = $('<iframe />') | |
.attr('src', i.href) | |
.load(function () { | |
i.contents().find('[name="agreed"]').click(); | |
i.contents().find('[type="submit"]').click(); | |
}) | |
.appendTo('body') | |
; | |
}); |
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
return !filterValue || this.props.matchPos === 'start' | |
? this.props.matchProp !== 'label' | |
&& valueTest.toLowerCase().substr(0, filterValue.length) === filterValue || this.props.matchProp !== 'value' | |
&& labelTest.toLowerCase().substr(0, filterValue.length) === filterValue | |
: this.props.matchProp !== 'label' && valueTest.toLowerCase().indexOf(filterValue.toLowerCase()) >= 0 | |
|| this.props.matchProp !== 'value' && labelTest.toLowerCase().indexOf(filterValue.toLowerCase()) >= 0; |
NewerOlder