Skip to content

Instantly share code, notes, and snippets.

View rudiedirkx's full-sized avatar

Rudie Dirkx rudiedirkx

View GitHub Profile
--- sendmail.mc 2023-06-05 18:02:04.731427285 +0200
+++ sendmail.mc 2023-06-05 18:04:03.723468728 +0200
@@ -88,4 +88,10 @@
FEATURE(`conncontrol', `nodelay', `terminate')dnl
FEATURE(`ratecontrol', `nodelay', `terminate')dnl
+
+MASQUERADE_AS(example.com)dnl
+FEATURE(masquerade_envelope)dnl
+FEATURE(masquerade_entire_domain)dnl
+MASQUERADE_DOMAIN(example.com)dnl
<?php
// Using https://packagist.org/packages/mollie/mollie-api-php
$info = [
'amount' => [
'currency' => $this->config['currency'] ?: 'EUR',
'value' => number_format($this->payment->amount, 2, '.', ''),
],
'description' => $this->payment->order_description,
@rudiedirkx
rudiedirkx / read-error-log.php
Last active April 19, 2023 22:29
read-error-log.php
#!/usr/bin/env php
<?php
$args = array_slice($_SERVER['argv'], 1);
if (!count($args)) {
echo "Missing file argument\n";
exit(1);
}
$project = null;
@rudiedirkx
rudiedirkx / sendmail.mc.diff
Created May 5, 2022 21:44
sendmail.mc.diff
@@ -88,6 +88,12 @@
dnl # Stop connections that overflow our concurrent and time connection rates
FEATURE(`conncontrol', `nodelay', `terminate')dnl
FEATURE(`ratecontrol', `nodelay', `terminate')dnl
+
+MASQUERADE_AS(digitalinsightsplatform.nl)dnl
+FEATURE(masquerade_envelope)dnl
+FEATURE(masquerade_entire_domain)dnl
+MASQUERADE_DOMAIN(digitalinsightsplatform.nl)dnl
+
<?php
$home = rtrim(getenv('HOME'), '\\/');
$moreDirs = array_slice($_SERVER['argv'], 1);
$output = `df -h`;
if (!preg_match('#(\d+)% +/\s#', "$output ", $match)) {
echo trim($output) . "\n";
exit(1);
<analyses>
<analysis>
<test>
<testCode>A</testCode>
</test>
<package>
<packageCode>C</packageCode>
</package>
<package>
<packageCode>D</packageCode>
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('');
}
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]]));
}
});
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) {
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');