Skip to content

Instantly share code, notes, and snippets.

# you can make a text file of request times (in ms, one number per line) and import it here, or you can use a probability distribution to simulate request times (see below where setting req_durations_in_ms)
# rq = read.table("~/Downloads/request_times.txt", header=FALSE)$V1
# argument notes:
# parallel_router_count is only relevant if router_mode is set to "intelligent"
# choice_of_two, power_of_two, and unicorn_workers_per_dyno are only relevant if router_mode is set to "naive"
# you can only select one of choice_of_two, power_of_two, and unicorn_workers_per_dyno
run_simulation = function(router_mode = "naive",
reqs_per_minute = 9000,
@alvarobp
alvarobp / remote_pairing_setup.md
Last active July 29, 2022 20:20
Setting up a remote pair station with SSH + TMUX and/or Reverse SSH Tunnel

Disclaimer: The following examples try to give an overview of the process followed in different scenarios. Some commands were actually written from memory. Some tools might exist simplifying all this. Furthermore, I'm no expert so if anyone ever reads this and knows any improvement, please let me know.

Case 1: Direct access to Pairing Station

Given that the Guest User can access the Pairing Station directly, either because the station is publicly available or because NAT port forwarding can be used, there's only one thing we need to do, give ssh access to the Guest User by adding his ssh public key to our Local User (pair) .ssh/authorized_keys file.

The local user would open up a tmux session with

tmux new-session -s pairing
@lhecker
lhecker / bytesum_intrinsics.c
Created May 13, 2014 15:14
Optimized version of bytesum_intrinsics.c from http://jvns.ca/blog/2014/05/12/computers-are-fast/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <time.h>
#include <emmintrin.h>
/*
* Round up n to the next multiple of m.
* m needs to be a power of 2.
*/
@TeMPOraL
TeMPOraL / orgmode.el
Created November 3, 2016 13:58
Excerpts from the current config for org-mode I use.
(try-load-and-configure-library
'org-install
(setq org-hide-leading-stars t)
(setq org-pretty-entities t)
(setq org-pretty-entities-include-sub-superscripts nil)
(setq org-return-follows-link t)
(setq org-special-ctrl-a/e t)
(setq org-log-done t)