Skip to content

Instantly share code, notes, and snippets.

View liweinan's full-sized avatar
🐢

阿男 liweinan

🐢
View GitHub Profile
@cedrickchee
cedrickchee / onsi_haiku_test.md
Last active June 8, 2023 15:54
Onsi Haiku Test

Onsi Haiku Test

Context: Cloud, serverless, FaaS, PaaS, CaaS, Kubernetes, cloud-native, Knative, serverful, product engineer, platform engineer, platform operator, DevOps practices, Heroku, Fly.io, Render, Netlify, Vercel, and many more.

I asked a CTO what is their north stars when it comes to running code on the Cloud. They said, it's the Onsi Haiku Test:

Onsi Haiku Test, is a haiku that Onsi Fakhouri shared at a conference:

Here is my source code.

The Freenode resignation FAQ, or: "what the fuck is going on?"

IMPORTANT NOTE:

It's come to my attention that some people have been spamming issue trackers with a link to this gist. While it's a good idea to inform people of the situation in principle, please do not do this. By all means spread the word in the communities that you are a part of, after verifying that they are not aware yet, but unsolicited spam is not helpful. It will just frustrate people.

Update 3 (May 24, 2021)

A number of things have happened since the last update.

//usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS io.smallrye.reactive:smallrye-mutiny-vertx-redis-client:1.1.0
//DEPS io.smallrye.reactive:mutiny:0.7.0
//DEPS org.testcontainers:testcontainers:1.14.3
//DEPS org.slf4j:slf4j-nop:1.7.30
package io.vertx.mutiny.redis;
import io.smallrye.mutiny.Multi;
@tterem
tterem / generate.key.sh
Created April 18, 2019 09:07
Generate keystores for RESTEasy client ssl tests
#!/bin/bash
PASS="123456"
DN_SERVER="server"
DN_CLIENT="client"
VALIDITY=10000
DIR=$1
HOST="localhost"
cd ${DIR}
/**
* This is an example gulpfile.js for orchestrating a Webpack build alongside the Hugo static site generator.
*
* This example assumes you already have Webpack installed and configured in your project.
*
* To get started, install Gulp and BrowserSync with the following command:
* npm install gulp browser-sync
*
* Then add this file to your project and name it gulpfile.js
*/
@kekru
kekru / 01nginx-tls-sni.md
Last active April 1, 2024 02:29
nginx TLS SNI routing, based on subdomain pattern

Nginx TLS SNI routing, based on subdomain pattern

Nginx can be configured to route to a backend, based on the server's domain name, which is included in the SSL/TLS handshake (Server Name Indication, SNI).
This works for http upstream servers, but also for other protocols, that can be secured with TLS.

prerequisites

  • at least nginx 1.15.9 to use variables in ssl_certificate and ssl_certificate_key.
  • check nginx -V for the following:
    ...
    TLS SNI support enabled
@tom-tan
tom-tan / gist:b5669b6dc1f1b897a39dd4eedecfbb9b
Last active January 19, 2021 14:27
podman を Alpine 内で動かそうとしたメモ
@bradtraversy
bradtraversy / docker_wordpress.md
Last active April 10, 2024 08:56
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@a7v8x
a7v8x / graphql_introspection_query.graphql
Last active November 5, 2023 12:36
GraphQL introspection query - for fetching the whole schema (from GraphiQL IDE) for https://atheros.ai/blog/graphql-introspection-and-introspection-queries
query IntrospectionQuery {
__schema {
queryType { name }
mutationType { name }
types {
...FullType
}
directives {
name
description
/****************************
What is a Polyfill
How to create a Polyfill
NOT recommended on DOM Objects
Array - justLetter - only keep
Strings with a specific letter
Date - f$$kinDay - return the day
of the week with prefix