Skip to content

Instantly share code, notes, and snippets.

@jeichorn
jeichorn / init-storage.sh
Created May 26, 2020 19:40
Storge init script for pagely buildkite ami
#!/usr/bin/bash
rm -f /var/lib/docker/swap
mkfs.ext4 /dev/nvme1n1 -L docker
echo 'LABEL=docker /var/lib/docker ext4 defaults,noatime,nofail 0 0' >> /etc/fstab
mkdir -p /var/lib/docker
mount /var/lib/docker
/usr/local/bin/swap.sh 4G /var/lib/docker/swap
mkdir -p /var/lib/docker/buildkite-agent
mkdir -p /var/lib/buildkite-agent
--- a/src/functions_include.php 2018-11-26 08:09:30.000000000 +0000
+++ b/src/functions_include.php 2020-02-07 20:51:43.408706946 +0000
@@ -15,5 +15,4 @@
*/
if (!function_exists('League\Uri\create')) {
require __DIR__.'/functions.php';
- require __DIR__.'/Schemes/deprecated.php';
}
diff --git a/vendor/league/uri-schemes/src/functions_include.php b/backends/vendor/league/uri-schemes/src/functions_include.php
index ea9b31d40..8f8892dff 100644
--- a/src/functions_include.php
+++ b/src/functions_include.php
@@ -15,5 +15,4 @@
*/
if (!function_exists('League\Uri\create')) {
require __DIR__.'/functions.php';
- require __DIR__.'/Schemes/deprecated.php';
}
<?php
function eb($retries)
{
return min(20000, (int) pow(2, $retries) * 100) + mt_rand(0, 100);
}
for($i = 0; $i < 10; $i++)
{
echo "Round $i\n";
<?php
function eb($retries)
{
return mt_rand(0, (int) min(20000, (int) pow(2, $retries) * 100));
}
for($i = 0; $i < 10; $i++)
{
echo "Round $i\n";
@jeichorn
jeichorn / gist:0e475ee774eff300f281f82e15570f60
Last active November 6, 2017 23:13
AWS Re-Invent 2017 sessions of interest
ABD206 - Building Visualizations and Dashboards with Amazon QuickSight
ABD309 - How Twilio Scaled Its Data-Driven Culture
ABD314 - Searching Your Data in Amazon RDS and Amazon DynamoDB
ABD326 - Easy and Scalable Log Analytics with Amazon Elastisearch Service
ABD322 - Implementing a Flight Simulator Interface Using AI, Virtual Reality, and Big Data on AWS
ABD219 - Automatically Catalog Your Data Lake Using AWS Glue Crawlers
ABD327 - Migrating Your Traditional Data Warehouse to a Modern Data Lake
time by minute total 200 404 403 429 499 500 503 504 other Avg Avg >50 Max
2017-03-07 17:45 2017-03-07 10:45 3517 3108 218 13 5 20 3 0 4 146 1978 11672 60003
2017-03-07 17:50 2017-03-07 10:50 4489 3377 207 10 5 27 1 433 305 124 6628 40591 60073
2017-03-07 17:55 2017-03-07 10:55 3816 2540 54 6 0 26 0 510 627 53 9973 57052 60016
2017-03-07 18:00 2017-03-07 11:00 3195 1917 22 12 0 8 0 506 552 178 11702 52806 64239
2017-03-07 18:05 2017-03-07 11:05 3566 2860 161 37 0 4 5 116 90 293 3056 12657 70055
2017-03-07 18:10 2017-03-07 11:10 3471 2930 284 22 3 2 3 0 0 227 391 1819 8045
time by minute total 200 301 302 304 404 403 429 499 500 503 504 other Avg Avg >50 Max
2017-03-07 10:45 3517 3108 93 31 18 218 13 5 20 3 0 4 4 1978 11672 60003
2017-03-07 10:50 4489 3377 77 13 25 207 10 5 27 1 433 305 9 6628 40591 60073
2017-03-07 10:55 3816 2540 21 0 30 54 6 0 26 0 510 627 2 9973 57052 60016
2017-03-07 11:00 3195 1917 15 0 22 22 12 0 8 0 506 552 141 11702 52806 64239
2017-03-07 11:05 3566 2860 60 49 33 161 37 0 4 5 116 90 151 3056 12657 70055
2017-03-07 11:10 3471 2930 114 77 28 284 22 3 2 3 0 0 8
@jeichorn
jeichorn / gist:d33dfcb6ba687dd84fb65945f59a4f5a
Created August 23, 2016 23:43
Performance Summary for select wp_option, wp_value from wp_option where autoload = 'yes', myisam and inndob, with an index compared to a baseline without
myisam_index_176/168 slower - 1.1852x diff -0.0002
innodb_index_176/168 faster - 1.0767x diff 0.0001
myisam_index_738/731 faster - 1.1165x diff 0.0003
innodb_index_738/731 faster - 1.0232x diff 0.0001
myisam_index_324/318 slower - 1.1013x diff -0.0001
innodb_index_324/318 faster - 1.1106x diff 0.0001
myisam_index_138/133 slower - 1.0953x diff -0.0001
innodb_index_138/133 equal
myisam_index_341/333 equal
innodb_index_341/333 equal