Skip to content

Instantly share code, notes, and snippets.

Wenzhi Liang wzhliang

Block or report user

Report or block wzhliang

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:8c4f3559b51bbfe6178d43c36cc04ac1
it('should handle feedback submission correctly', () => {
// navigate to testdriven.io
cy.visit('/');
cy.get('h1').contains('Test-Driven Development Courses');
// click feedback button
cy.get('button').contains('Feedback').click();
cy.get('#feedbackModal').should('have.css', 'display', 'block');
cy.get('h5').contains('Send Us Feedback');
cy.get('input[placeholder="Your email address"]').type('test@test.com');
cy.get('textarea').type('just a test');
View gist:3bab554a89866f1f381056f2df4ae523
proxy_cache_path /path/to/cache levels=1:2 keys_zone=my_cache:10m max_size=10g
inactive=60m use_temp_path=off;
server {
# ...
location / {
proxy_cache my_cache;
proxy_pass http://my_upstream;
}
}
@wzhliang
wzhliang / nginx_fallback
Created May 4, 2020
nginx fallback example
View nginx_fallback
server {
location / {
proxy_pass http://new_server;
error_page 404 500 502 503 504 = @fallback;
}
location @fallback {
proxy_pass http://old_server;
}
}
@wzhliang
wzhliang / gist:2942fcd9311fdfbe88655caeed2425f5
Last active Mar 18, 2020
trivy scan python alpine result
View gist:2942fcd9311fdfbe88655caeed2425f5
+---------+------------------+----------+-------------------+---------------+--------------------------------+
| LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION | TITLE |
+---------+------------------+----------+-------------------+---------------+--------------------------------+
| bzip2 | CVE-2019-12900 | HIGH | 1.0.6-r6 | 1.0.6-r7 | bzip2: out-of-bounds write in |
| | | | | | function BZ2_decompress |
+---------+------------------+ +-------------------+---------------+--------------------------------+
| expat | CVE-2018-20843 | | 2.2.6-r0 | 2.2.7-r0 | expat: large number of colons |
| | | | | | in input makes parser consume |
| | | | | | high amount... |
+ +--------------
View gist:6754c0dcdb7d38688c7678049f36a197
+---------+------------------+----------+-------------------+---------------+--------------------------------+
| LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION | TITLE |
+---------+------------------+----------+-------------------+---------------+--------------------------------+
| bzip2 | CVE-2019-12900 | HIGH | 1.0.6-r6 | 1.0.6-r7 | bzip2: out-of-bounds write in |
| | | | | | function BZ2_decompress |
+---------+------------------+ +-------------------+---------------+--------------------------------+
| expat | CVE-2018-20843 | | 2.2.6-r0 | 2.2.7-r0 | expat: large number of colons |
| | | | | | in input makes parser consume |
| | | | | | high amount... |
+ +--------------
@wzhliang
wzhliang / README.md
Created Feb 22, 2020
testing ruby based gist
View README.md
description
A Kubernetes operator for the rqlite database.

rqlite-operator

Getting Started

You can install the rqlite-operator as follows:

View README.md
description
A Kubernetes operator for the rqlite database.

rqlite-operator

Getting Started

You can install the rqlite-operator as follows:

@wzhliang
wzhliang / default.md
Last active Dec 5, 2019
dotnet wcfservice docker run fail on MacOS
View default.md

$ docker run mcr.microsoft.com/dotnet/framework/samples:wcfservice

Unable to find image 'mcr.microsoft.com/dotnet/framework/samples:wcfservice' locally wcfservice: Pulling from dotnet/framework/samples docker: no matching manifest for linux/amd64 in the manifest list entries. See 'docker run --help'.

View merge_repos.sh
#!/bin/bash
# This script takes a remote repository and merges it into
# the current one as a subdirectory
set -e
if [ -z "$1" ]
then
echo "Usage:"
@wzhliang
wzhliang / k8s-ipvs-cli.txt
Created May 13, 2019
kubernetes kube-proxy IPVS CLI illustration
View k8s-ipvs-cli.txt
# kubectl describe svc nginx-service
Name: nginx-service
...
Type: ClusterIP
IP: 10.102.128.4
Port: http 3080/TCP
Endpoints: 10.244.0.235:8080,10.244.1.237:8080
Session Affinity: None
# ip addr
You can’t perform that action at this time.