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
<analyses> | |
<analysis> | |
<test> | |
<testCode>A</testCode> | |
</test> | |
<package> | |
<packageCode>C</packageCode> | |
</package> | |
<package> | |
<packageCode>D</packageCode> |
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'); | |
var https = require('https'); | |
var websocket = require('websocket'); | |
var util = require('util'); | |
function _log(msg) { | |
console.log.apply(console, arguments); | |
console.log(''); | |
} |
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 PACKAGE = 'rdx/db'; | |
ghGrapQL(`query { viewer { login, repositories(first: 100, privacy: PUBLIC, orderBy: {direction: DESC, field: PUSHED_AT}) { nodes { name } } } }`).then(rsp => { | |
return rsp.data.viewer.repositories.nodes.map(repo => `${rsp.data.viewer.login}/${repo.name}`) | |
}).then(repos => { | |
return repos.map(repo => { | |
return (rsps) => { | |
console.log(repo); | |
return fetch(`https://rawgit.com/${repo}/master/composer.json`).then(rsp => rsp.ok ? rsp.json() : null).then(rsp => rsps.concat([[repo, rsp]])); | |
} | |
}); |
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 queue = []; | |
chrome.browserAction.onClicked.addListener(function(tab) { | |
var url = 'http://www.example.com/?x=' + String(Math.random()).substr(2); | |
queue.push(url); | |
console.log('queue', queue); | |
chrome.tabs.update({url}); | |
}); | |
chrome.runtime.onMessage.addListener(function(msg, sender, sendResponse) { |
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: | |
document.addEventListener('mousedown', e => { | |
if (e.button == 2 && e.target.nodeName == 'SELECT') { | |
window.sst = setTimeout(function() { | |
var q = prompt('Search what?', ''); | |
if (q === '') { | |
[].forEach.call(e.target.options, o => o.style.display = ''); | |
} | |
else if (q != null) { | |
[].forEach.call(e.target.options, o => o.style.display = o.textContent.toLowerCase().indexOf(q) >= 0 ? '' : 'none'); |
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
<?php | |
/** | |
* Converts UTF-8 to XML-safe HTML entities: Изложение => Изложение | |
*/ | |
function xmlencode($string) { | |
$string = (string) $string; | |
// Replace < and ' and & etc. | |
$string = htmlspecialchars($string, ENT_XML1 | ENT_QUOTES); |
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(f, a) { | |
f = new Blob(['"Date","Description","Amount"\n', [].map.call(queryAllShadow('[data-tag-name="ing-ow-expandable-item"]', queryAllShadow('[data-tag-name="ing-feat-transaction-period"]').reverse()[0]), row => ([ | |
row.closest('.date-item').querySelector('time').getAttribute('datetime'), | |
row.querySelector('h5').textContent.trim(), | |
row.querySelector('h5 + strong').textContent.trim().replace(',', '.').replace('−', '-'), | |
]).map(col => '"' + col.replace(/"/g, '""') + '"').join(',')).join('\n')], {type: 'text/plain'}); | |
a = document.createElement('a'); | |
a.download = 'trans.csv'; | |
a.href = URL.createObjectURL(f); | |
a.click(); |
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
<?php | |
$utcStart = microtime(true); | |
// Last modified timestamp | |
defined('TIMESTAMP') or define('TIMESTAMP', 'D d-M-Y H:i'); | |
// Permissions | |
defined('ENABLE_DOWNLOAD') or define('ENABLE_DOWNLOAD', false); | |
defined('ENABLE_SOURCE') or define('ENABLE_SOURCE', false); |
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
<?php | |
class SendUserInvitationJob { | |
protected $user; | |
protected $tests; | |
function __construct(User $user, array $tests) { | |
$this->user = $user; | |
$this->tests = $tests; | |
} |
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
# all at once: | |
vendor/bin/behat | |
# per feature: | |
find features/ -type f -name *.feature | xargs -n 1 vendor/bin/behat |