Skip to content

Instantly share code, notes, and snippets.

@mk-pmb
mk-pmb / maxconc.log
Created January 12, 2018 01:53
npm bug 18903 worked around using tcpfwd-maxconc-pmb v0.2.1
$ nodejs -r tcpfwd-maxconc-pmb -e 0 max_conc=25 lsn_port=8117 tgt_idle=5
02:45:08 Target connections are reclaimed after 5 seconds of idleness.
02:45:08 Gonna listen on TCP localhost:8117 --{maxConc=25}--> TCP localhost:8118
02:45:08 Listening. 127.0.0.1:8117 --{maxConc=25}--> TCP localhost:8118
02:45:15 Guest 0: 127.0.0.1:46428 enqueued. remaining seats: 25, remaining waiting guests: 1
02:45:15 Guest 1: 127.0.0.1:46430 enqueued. remaining seats: 25, remaining waiting guests: 2
02:45:15 Guest 2: 127.0.0.1:46432 enqueued. remaining seats: 25, remaining waiting guests: 3
02:45:15 Guest 3: 127.0.0.1:46434 enqueued. remaining seats: 25, remaining waiting guests: 4
02:45:15 Guest 4: 127.0.0.1:46436 enqueued. remaining seats: 25, remaining waiting guests: 5
02:45:15 Guest 5: 127.0.0.1:46438 enqueued. remaining seats: 25, remaining waiting guests: 6
18:45:53 Will idle-quit after 0.5 minutes of inactivity.
18:45:53 Gonna listen on TCP localhost:1073
18:45:53 Listening. 127.0.0.1:1073
18:45:54 Guest 0: 127.0.0.1:44448 enqueued. remaining seats: 5, remaining waiting guests: 1
18:45:54 Guest 1: 127.0.0.1:44449 enqueued. remaining seats: 5, remaining waiting guests: 2
18:45:54 Guest 0: connecting. remaining seats: 4, remaining waiting guests: 1
18:45:54 Guest 0: plumbing the pipes.
18:45:54 Guest 1: connecting. remaining seats: 3, remaining waiting guests: 0
18:45:54 Guest 1: plumbing the pipes.
18:45:54 No guests waiting.
<h3 class="widgettitle"><span>Inhaltsverzeichnis</span></h3>
<form action="http://netzwerk-arbeit.com" method="get"
style="display: block; position: relative;"
>
<label class="screen-reader-text" for="cat">Inhaltsverzeichnis</label>
<select name="cat" id="cat" class="postform">
<option value="-1">Kategorie auswählen</option>
<option class="level-0" value="45">Aktuelle Themen&nbsp;&nbsp;(2.484)</option>
<option class="level-0" value="579">Ausbildungsplatzvermittlung – kostenlos&nbsp;&nbsp;(1)</option>
<option class="level-0" value="582">Bewerbungstipps&nbsp;&nbsp;(6)</option>
@mk-pmb
mk-pmb / XHRmonkey.user.js
Last active December 14, 2017 22:47
Sync XHR is broken as well
/* -*- coding: UTF-8, tab-width: 2 -*- */
/*jslint indent: 2, maxlen: 80, browser: true */
// ==UserScript==
// @name XHRmonkey test
// @namespace greasemonkey.web-enhance.pimpmybyte.de
// @description
// @match https://gist.github.com/mk-pmb/22b0b3d9f0f704966007347dd2168c5d
// @version 1
// @grant GM.xmlHttpRequest
// ==/UserScript==
@mk-pmb
mk-pmb / test.shafork.log
Last active November 24, 2017 19:42
debugging npm
TAP version 13
# Subtest: setup
# test for https://github.com/npm/npm/issues/3265
1..0
ok 1 - setup # time=24.205ms
# Subtest: npm cache - install from fork
ok 1 - install finished without error
ok 2 - Should not get data on stderr:
ok 3 - install finished successfully
<?php
$f = function ($a) {
return function ($b) use ($a) { return $a + $b; };
};
$g = $f(2);
$x = $g(3);
var_dump($x); # 5
/*jslint indent: 2, maxlen: 80, continue: false, unparam: false, node: true */
/* -*- tab-width: 2 -*- */
'use strict';
function displayGame(field, colSep, rowSep) {
return field.map(String).join(rowSep).replace(/,/g, colSep);
}
function clearRightOf(field) {
if (!window.confirm('Clear cells right of trigger field?')) { return; }
window.lastClearRightTrigger = this;
var right = jQuery(field).parent().nextAll();
right.find('input').val('');
right.find('select').prop('selectedIndex', 0);
window.alert('Should be cleared now, look before you then click ok.');
}
jQuery(document).ready(function () {
@mk-pmb
mk-pmb / movies.in.json
Last active November 10, 2017 02:14
movie sort thingie
[ { "title": "Test 1",
"type": [
{ "name": "Animal", "level": 1 },
{ "name": "Food", "level": 1 },
{ "name": "Chicken", "level": 3 } ]
},
{ "title": "Test 2",
"type": [ { "name": "Foo", "level": 2 } ]
},
{ "title": "Test 3",
@mk-pmb
mk-pmb / 01_npm.log
Last active October 19, 2017 12:12
npm --maxsockets=1 opens 125 connections to HTTP proxy
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node',
1 verbose cli '/mnt/…/node_modules/npm/bin/npm-cli.js',
1 verbose cli 'install',
1 verbose cli '--verbose',
1 verbose cli '--only=dev',
1 verbose cli '--maxsockets=1',
1 verbose cli '.' ]
2 info using npm@5.5.0
3 info using node@v6.11.4