Skip to content

Instantly share code, notes, and snippets.

View ozbillwang's full-sized avatar
:octocat:

Bill Wang ozbillwang

:octocat:
View GitHub Profile
@ozbillwang
ozbillwang / varnishlog-examples.sh
Created January 15, 2018 23:39 — forked from cupracer/varnishlog-examples.sh
varnishlog examples (version 4.x)
# filter by request host header
varnishlog -q 'ReqHeader ~ "Host: example.com"'
# filter by request url
varnishlog -q 'ReqURL ~ "^/some/path/"'
# filter by client ip (behind reverse proxy)
varnishlog -q 'ReqHeader ~ "X-Real-IP: .*123.123.123.123"'
# filter by request host header and show request url and referrer header
@ozbillwang
ozbillwang / serverelss_build.md
Last active January 24, 2018 05:57
how to build serverless framework by yourself.

Sometime, you can't wait and try new features in serverless framework (github.com/serverless/serverless)

serverless/serverless#4325 (comment)

run below commands, this build will generate new serverless command.

cd <serverless_repo_full_path>
# Fake the environment "SENTRY_DSN", otherwise, it will stop the build
export SENTRY_DSN=demo
@ozbillwang
ozbillwang / list contributors.md
Last active October 9, 2017 10:45
list contributors
@ozbillwang
ozbillwang / gist:1ca847bc01c8105ff7174a631e19a27e
Last active November 6, 2017 23:47
virtualbox guest - sync time
@ozbillwang
ozbillwang / Wishlist for Drone CI.md
Last active September 11, 2017 01:02
Wishlist for Drone CI
@ozbillwang
ozbillwang / .travis.yml
Created August 1, 2017 12:07
terraform validates with Travis CI
env:
- tf_version=0.8.8
- tf_version=0.9.11
sudo: required
language: bash
before_install:
- wget https://releases.hashicorp.com/terraform/${tf_version}/terraform_${tf_version}_linux_amd64.zip -O /tmp/terraform.zip
@ozbillwang
ozbillwang / aurora_cluster.tf
Created June 5, 2017 07:06 — forked from sandcastle/aurora_cluster.tf
Creates a AWS RDS Aurora Cluster with Terraform
########################
## Variables
########################
variable "environment_name" {
description = "The name of the environment"
}
variable "vpc_id" {
@ozbillwang
ozbillwang / ec2.py
Created April 10, 2017 13:39
github.com/ansible/ansible/contrib/inventory/ec2.py - #15215
#!/usr/bin/env python
'''
EC2 external inventory script
=================================
Generates inventory that Ansible can understand by making API request to
AWS EC2 using the Boto library.
NOTE: This script assumes Ansible is being executed where the environment
@ozbillwang
ozbillwang / The way to build red hat base docker image without subscription managed registered.md
Last active January 29, 2024 14:47
The way to build red hat base docker image without subscription managed registered.

In redhat, if you need build container from base image, for example, registry.access.redhat.com/rhel7/rhel:7.3-53 (free download from https://access.redhat.com/containers) You have to build this image on a red hat server with subscription managed registered.

Here is the way to bypass the check and you can build docker image on any redhat 7 server.

make sure the package has been installed

yum install rh-amazon-rhui-client

list the package files