Skip to content

Instantly share code, notes, and snippets.

View joshxyzhimself's full-sized avatar

joshxyzhimself joshxyzhimself

  • Philippines
View GitHub Profile

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@joshxyzhimself
joshxyzhimself / haproxy_letsencrypt.md
Created March 4, 2023 00:31 — forked from lmmendes/haproxy_letsencrypt.md
# HAProxy and Let's Encrypt

HAProxy and Let's Encrypt

HAProxy is a open-source TCP/HTTP load-balancing proxy server supporting native SSL, keep-alive, compression CLI, and other modern features.

Let’s Encrypt is a free, automated, and open certificate authority (CA), run for the public’s benefit. Let’s Encrypt is a service provided by the Internet Security Research Group (ISRG).

Concept

MicroService Proxy Gateway Solutions

Kong, Traefik, Caddy, Linkerd, Fabio, Vulcand, and Netflix Zuul seem to be the most common in microservice proxy/gateway solutions. Kubernetes Ingress is often a simple Ngnix, which is difficult to separate the popularity from other things.

Github Star Trend:

Github Star History for Kong vs traefik vs fabio vs caddy vs Zuul

This is just a picture of this link from March 2, 2019

Originally, I had included some other solution

@joshxyzhimself
joshxyzhimself / offline-gmaven-stable.zip - how to use Android Studio with downloads of offline Android Gradle plugin and Google Maven repository dependencies.md
Created July 14, 2022 06:28
offline-gmaven-stable.zip - how to use Android Studio with downloads of offline Android Gradle plugin and Google Maven repository dependencies.

Use the Android Gradle Plugin offline

This document describes how to use Android Studio with downloads of offline Android Gradle plugin and Google Maven repository dependencies.

Download and unzip offline components

If you haven’t already done so, download the offline components from the official Android Studio website: https://d.android.com/r/studio-offline/downloads .

@joshxyzhimself
joshxyzhimself / https-during-dev.macos.sh
Created February 14, 2022 05:39 — forked from disintegrator/https-during-dev.macos.sh
Use Caddy, mkcert and dnsmasq to expose your development server over HTTPS
brew install caddy mkcert nss dnsmasq
mkcert -install
mkcert '*.app.test' '*.cdn.test'
# rename the certs and move them under /usr/local/etc/caddy/certs
cat <<EOF > /usr/local/etc/caddy/Caddyfile
*.app.test:443, *.cdn.test:443 {

Unofficial Bash Strict Mode

Sometimes a programming language has a "strict mode" to restrict unsafe constructs. E.g., Perl has use strict, Javascript has "use strict", and Visual Basic has Option Strict. But what about bash? Well, bash doesn't have a strict mode as such, but it does have an unofficial strict mode:

set -euo pipefail

set -e

@joshxyzhimself
joshxyzhimself / Node.JS 8.9.4 - V8 6.1.534.50
Created April 9, 2021 08:33 — forked from ColonelBundy/Node.JS 8.9.4 - V8 6.1.534.50
Promise vs Callback vs Async/await benchmark 2018
Doxbee sequential
benchmarking ./doxbee-sequential/async-bluebird.js
{"time":428,"mem":60.38671875,"errors":0,"lastErr":null}
benchmarking ./doxbee-sequential/async-es2017-native.js
{"time":591,"mem":98.82421875,"errors":0,"lastErr":null}
benchmarking ./doxbee-sequential/async-es2017-util.promisify.js
{"time":479,"mem":69.7734375,"errors":0,"lastErr":null}
benchmarking ./doxbee-sequential/callbacks-baseline.js
{"time":149,"mem":29.99609375,"errors":0,"lastErr":null}
@joshxyzhimself
joshxyzhimself / JSON-intArray-converter.js
Created February 26, 2021 23:17 — forked from tomfa/JSON-intArray-converter.js
JSON to 8-bit-integer parsing (and visa versa)
// JSON to Uint8Array parsing and visa versa
// (Intended Bluetooth communication on Cordova)
var JsonToArray = function(json)
{
var str = JSON.stringify(json, null, 0);
var ret = new Uint8Array(str.length);
for (var i = 0; i < str.length; i++) {
ret[i] = str.charCodeAt(i);
}
@joshxyzhimself
joshxyzhimself / haproxy-config-2-0.cfg
Created September 4, 2020 16:28 — forked from haproxytechblog/haproxy-config-2-0.cfg
HAProxy 2.0 configuration
#
# This is the ultimate HAProxy 2.0 "Getting Started" config
# It demonstrates many of the features available which are now available
# While you may not need all of these things, this can serve
# as a reference for your own configurations.
#
# Have questions? Check out our community Slack:
# https://slack.haproxy.org/
#
@joshxyzhimself
joshxyzhimself / download-pdf.js
Created July 29, 2020 04:24 — forked from devloco/download-pdf.js
Download a PDF via POST with Fetch API
let fnGetFileNameFromContentDispostionHeader = function (header) {
let contentDispostion = header.split(';');
const fileNameToken = `filename*=UTF-8''`;
let fileName = 'downloaded.pdf';
for (let thisValue of contentDispostion) {
if (thisValue.trim().indexOf(fileNameToken) === 0) {
fileName = decodeURIComponent(thisValue.trim().replace(fileNameToken, ''));
break;
}