Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<style>
.row {
font-family: monospace;
display: block;
$ time curl -v -H'Pragma: akamai-x-cache-on, akamai-x-cache-remote-on, akamai-x-check-cacheable, akamai-x-get-cache-key, akamai-x-get-ssl-client-session-id, ak
amai-x-get-true-cache-key, akamai-x-get-request-id' https://secure-a.vimeocdn.com/js/froogaloop2.min.js >/dev/null
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 23.192.55.218...
* TCP_NODELAY set
* Connected to secure-a.vimeocdn.com (23.192.55.218) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
delay=0.1
while true
do
clear
printf '%s\n' \
"ROFL:ROFL:LOL:" \
" _^___" \
" L __/ [] \\" \
" O ===__ \\" \
" L \\________]" \
curl \
--request PUT \
--header "X-Consul-Token: ${MASTERKEY}" \
--data \
'{
"Name": "vault-ge1",
"Type": "client",
"Rules": "{\"key\":{\"vault/\":{\"policy\":\"write\"}},\"node\":{\"\":{\"policy\":\"write\"}},\"service\":{\"vault\":{\"policy\":\"write\"}},\"agent\":{\"\":{\"policy\":\"write\"}},\"session\":{\"\":{\"policy\":\"write\"}}}"
}' http://127.0.0.1:8500/v1/acl/create
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
</head>
<body>
<video src="https://gistcdn.githack.com/cfebs/5362154caad74f0a7d4c7640d7ac7d6a/raw/2f93dcd66954f6a9c830637f8d26674323eb626e/vid.mp4" loop="1" autoplay="1" />
</body>
@cfebs
cfebs / rofl.sh
Created September 22, 2017 13:17
delay=0.1
while true
do
clear
printf '%s\n' \
"ROFL:ROFL:LOL:" \
" _^___" \
" L __/ [] \\" \
" O ===__ \\" \
" L \\________]" \
@cfebs
cfebs / export1.html
Last active September 20, 2017 01:18
Canvas record
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<style>
#draw{
}
</style>
</head>
@cfebs
cfebs / guide.md
Last active February 16, 2022 19:49
Ubuntu guest virtualbox on Windows 10 host with ssh port forwarding

If you want:

  • a Linux guest runnning on a Windows host
  • the ability to ssh to the guest from the Windows host
  • the ability to ssh to the guest from another machine on your home network

About 90% of this comes from: https://gist.github.com/pjdietz/5768124 just with a few fixes for the host only network

Setup

1 Create a host only network in the Virtualbox GUI

This is to track moving completely off of vms for rpcs.

We currently have 4 rpc boxes: rpcb1..4 and 16 vms: rpc1..16

At peak we are handling about 8k connections per second.

1 physical machine at peak is handling about 1.3k connections per sec. This is in an underutilized state too, plenty of resource room (at peak with php7 we're talking < 20% CPU and 130Mbps) 1 vm is handling about 230 connections per sec

To maintain our current capacity we should determine how many more new hardware boxes we should add accounting for the fact that rpcb1,2 need to go away.

@cfebs
cfebs / README.md
Last active July 14, 2018 07:58
A demonstration of the dangers of window.onload and iframes

Instructions

Download server.js and run node server.js (tested with node v6.10.1)

Visit http://localhost:3000/