Skip to content

Instantly share code, notes, and snippets.

View DukeyToo's full-sized avatar

Steve Campbell DukeyToo

  • Minneapolis, MN, USA
  • 12:23 (UTC -05:00)
View GitHub Profile

The perfectapi benchmark used an actual module that uses perfectapi, namely node-sharedmem. This module was chosen because it has no external dependencies, and has very little logic.

{ "exports": "fib",
"signature": [
{
"name": "fib",
"synopsis": "runs a fibonacci sequence",
"verb": "POST",
"parameters": [
{"name": "number", "required":true, "description":"which fibonacci to calculate"}
]
},
@DukeyToo
DukeyToo / setup.md
Last active January 5, 2016 14:13
FRC Robotics Windows setup

If you have admin access...

Use chocolatey to install software. From an administrative command prompt:

@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin

Re-open the administrative command prompt afterward to ensure all changes are reflected.

Eclipse

@DukeyToo
DukeyToo / decoded.js
Last active October 31, 2016 19:27
Optimized filter in es6 for decoding html values for angularjs when displaying in input or options
//simple filter to decode html-encoded values, for display in options or inputs
//optimized so that it doesn't redo the expensive decoding every time
myApp.filter('decoded', function() {
"use strict";
let e = null; //only init as-needed, and keep around
let cache = {};
function htmlDecode(input) {
if (cache[input]) {
@DukeyToo
DukeyToo / expressjs benchmark 2012-4-11
Created April 11, 2012 19:47
ab benchmarks on EC2 medium instance
ubuntu@domU-12-31-39-0C-49-FB:~$ ab -n 8000 -c 250 -k http://localhost:8001/middleware
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Completed 800 requests
Completed 1600 requests
Completed 2400 requests
Completed 3200 requests
@DukeyToo
DukeyToo / rexray-client.log.sh
Created November 16, 2017 15:59
Rexray logs
INFO[0000] updated log level logLevel=debug
DEBU[0000] created scoped scope new=rexray.cli parentScopes=rexray,
DEBU[0000] os.args time=1510847816918 val=[rexray volume ls]
DEBU[0000] activating libStorage cmd=ls time=1510847816918
DEBU[0000] host is empty; initiliazing default services time=1510847816926
DEBU[0000] libStorage auto service mode disabled; services defined time=1510847816928
DEBU[0000] starting embedded libStorage server time=1510847816928
DEBU[0000] created scoped scope new=libstorage.server parentScopes=rexray.cli,rexray,
INFO[0000] configured logging libstorage.logging.httpRequests=true libstorage.logging.httpResponses=true libstorage.logging.level=debug server=typhoon-hoof-lr time=1510847816981
DEBU[0000] parsed server auth property libstorage.server.auth.disabled=false server=typhoon-hoof-lr time
@DukeyToo
DukeyToo / linkerd.log
Last active December 7, 2017 18:11
linkerd leak log
systemd[1]: Started linkerd.
systemd[1]: Starting linkerd...
linkerd[20228]: -XX:+AggressiveOpts -XX:+CMSClassUnloadingEnabled -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:+CMSScavengeBeforeRemark -XX:InitialHeapSize=1073741824 -XX:MaxHeapSize=1073741824 -XX:MaxNewSize=357916672 -XX:MaxTenuringThreshold=6 -XX:NewSize=357916672 -XX:OldPLABSize=16 -XX:OldSize=715825152 -XX:+PrintCommandLineFlags -XX:+ScavengeBeforeFullGC -XX:-TieredCompilation -XX:+UseCMSInitiatingOccupancyOnly -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+UseStringDeduplication
linkerd[20228]: Dec 06, 2017 5:01:56 PM com.twitter.finagle.http.HttpMuxer$ $anonfun$new$1
linkerd[20228]: INFO: HttpMuxer[/admin/metrics.json] = com.twitter.finagle.stats.MetricsExporter(<function1>)
linkerd[20228]: Dec 06, 2017 5:01:56 PM com.twitter.finagle.http.HttpMuxer$ $anonfun$new$1
linkerd[20228]: INFO: HttpMuxer[/admin/per_host_metrics.json] = com.twitter.finagle.stats.HostMetric
Server Software:
Server Hostname: 10.110.49.174
Server Port: 8000
Document Path: /
Document Length: 12 bytes
Concurrency Level: 250
Time taken for tests: 9.339 seconds
Complete requests: 16000
@DukeyToo
DukeyToo / .gitconfig
Created March 11, 2020 14:49 — forked from Kovrinic/.gitconfig
git global url insteadOf setup
# one or the other, NOT both
[url "https://github"]
insteadOf = git://github
# or
[url "git@github.com:"]
insteadOf = git://github
@DukeyToo
DukeyToo / curl_good_behavior.txt
Created March 26, 2020 21:24
Envoy chunked upstream captures
1 2020-03-26 15:22:56.490142 172.22.0.104 172.22.0.33 TCP 74 49202 → 9445 [SYN] Seq=0 Win=42600 Len=0 MSS=1420 SACK_PERM=1 TSval=111349014 TSecr=0 WS=2048
Frame 1: 74 bytes on wire (592 bits), 74 bytes captured (592 bits)
Ethernet II, Src: 42:01:ac:16:00:01 (42:01:ac:16:00:01), Dst: 42:01:ac:16:00:21 (42:01:ac:16:00:21)
Internet Protocol Version 4, Src: 172.22.0.104, Dst: 172.22.0.33
Transmission Control Protocol, Src Port: 49202, Dst Port: 9445, Seq: 0, Len: 0
2 2020-03-26 15:22:56.490259 172.22.0.33 172.22.0.104 TCP 74 9445 → 49202 [SYN, ACK] Seq=0 Ack=1 Win=43648 Len=0 MSS=1420 SACK_PERM=1 TSval=16024870 TSecr=111349014 WS=2048
Frame 2: 74 bytes on wire (592 bits), 74 bytes captured (592 bits)