Skip to content

Instantly share code, notes, and snippets.

Trent Mick trentm

Block or report user

Report or block trentm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
trentm / output.txt
Created Feb 7, 2019
cutting python-manta 3.0.0
View output.txt
[15:39:40 trentm@bluesteel:~/pristine/python-manta (master)]
$ make cutarelease
manta/ ver is: 3.0.0 ver is: 3.0.0
[[ -z `git status --short` ]] # If this fails, the working dir is dirty.
** Are you sure you want to tag and publish manta@3.0.0 to pypi?
** Enter to continue, Ctrl+C to abort.
ver=3.0.0 && \
date=2019-02-07 && \
View gist:0665034330e633d8ef7de0a965ed2ea1
[root@build3:~/go/src/]$ ./bin/grafana-server cfg:app_mode=development
INFO[08-31|19:28:27] Starting Grafana logger=server version=5.3.0-pre1 commit=d668a922e compiled=2018-08-30T09:56:52+0000
INFO[08-31|19:28:27] Config loaded from logger=settings file=/root/go/src/
INFO[08-31|19:28:27] Config overridden from command line logger=settings arg="app_mode=development"
INFO[08-31|19:28:27] Path Home logger=settings path=/root/go/src/
INFO[08-31|19:28:27] Path Data logger=settings path=/root/go/src/
INFO[08-31|19:28:27] Path Logs logger=settings path=/root/go/src/
INFO[08-31|19:28:27] Path Plugins logger=settings path=/root/go/src/
View gist:4f21165ef3044d0ada6cc04bb500c045
[root@build3:~/go/src/]$ ptree
757243 /sbin/init
757268 /lib/svc/bin/svc.startd
757803 /usr/lib/saf/sac -t 300
757809 /usr/lib/saf/ttymon
757814 /usr/lib/saf/ttymon -g -d /dev/console -l console -m ldterm,ttcompat -h -p buil
757270 /lib/svc/bin/svc.configd
757335 /lib/inet/ipmgmtd
757566 /usr/lib/pfexecd
757609 /usr/sbin/nscd
View after.txt
$ node examples/listRepoTags.js bogus
listRepoTags: error: bogus repo not found
trentm / client.log
Last active Mar 2, 2018
node-whyyoulittle sample run of examples/server.js
View client.log
$ for i in `seq 1 10`; do sleep 0.3; (curl -i localhost:8080/slow &) ; done
HTTP/1.1 503 Service Unavailable
Content-Type: application/json
Content-Length: 64
x-request-id: 629905ae-83a0-407c-b055-52efc57e6430
Date: Fri, 02 Mar 2018 22:23:07 GMT
Connection: keep-alive
{"code":"ServiceUnavailableError","message":"request throttled"}HTTP/1.1 503 Service Unavailable
Content-Type: application/json
View 1. hello.log
{"name":"helloapi","hostname":"banana.local","pid":40168,"level":30,"msg":"Hello API listening at <>","time":"2012-03-28T17:29:48.223Z","v":0}
{"name":"helloapi","hostname":"banana.local","pid":40211,"level":30,"msg":"Hello API listening at <>","time":"2012-03-28T17:32:39.701Z","v":0}
{"name":"helloapi","hostname":"banana.local","pid":40211,"level":10,"msg":"New Request:\n\nGET /hello?name=paul HTTP/1.1\nuser-agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8r zlib/1.2.3\nhost:\naccept: */*\n","time":"2012-03-28T17:32:57.881Z","v":0}
{"name":"helloapi","hostname":"banana.local","pid":40211,"level":30,"req":{"method":"GET","url":"/hello?name=paul","headers":{"user-agent":"curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8r zlib/1.2.3","host":"","accept":"*/*"},"remoteAddress":"","remotePort":59828},"msg":"start","time":"2012-03-28T17:32:57.881Z","v":0}
trentm /
Created Jul 31, 2013
Bash function to use the URL shortener on stdin. See <> TODO: pbcopy it too if that command is available
# echo URL | googl
function googl {
local url=$(cat <&0)
set -e pipefail;
echo "{}" \
| json -e "this.longUrl='$url'" \
| curl -sf \
-H 'Content-Type: application/json' -d@- \
| json id
trentm /
Created Oct 26, 2016
tweaked for mingw32
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at
# Copyright 2016 Joyent, Inc.
trentm / ben-arrayiter.js
Last active Apr 12, 2016
Slow JavaScript array iter
View ben-arrayiter.js
var ben = require('ben');
var servers = [];
for (var i = 0; i < 1000; i++) {
servers.push({"uuid": "blah", "hostname": "blah", "vms": {"foo": "blah"}});
var forMs = ben(function () {
var filteredServers = [];
for (var i = 0; i < servers.length; i++) {
View gist:8ee1cc7394dac3bb4c3807b36e8fb99f
root@blackduck0:~/tmp/q# ls */package.json | grep -v sdc-headnode | grep -v sdc-amon | cut -d/ -f1
You can’t perform that action at this time.