Skip to content

Instantly share code, notes, and snippets.

View bingooyong's full-sized avatar
🍏
Working from home

bingooyong bingooyong

🍏
Working from home
View GitHub Profile
@bingooyong
bingooyong / nginx-tuning.md
Created July 20, 2022 08:08 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@bingooyong
bingooyong / password.txt
Created July 6, 2022 03:30 — forked from shellus/password.txt
弱密码字典
123456789
1234567890
a123456789
123456
qq123456
abc123456
123456789a
WOAINI1314
12345678
11111111
@bingooyong
bingooyong / NOTES.md
Created January 6, 2022 05:54 — forked from fatso83/NOTES.md
Installing Vagrant on Apple Silicon Macs (M1, M1X, etc)

VirtualBox only supports the x86 platform, so the default installation instructions for Vagrant does not work on Apple silicon. Thankfully Vagrant has a VMWare Provider (more on providers here), and so if I can get VMWare running on my M1 MacBook, I should be able to run Vagrant as well!

These are my notes during figuring this out.

Get the VMWare Tech Preview released in September 2021!

We are in luck, as VMWare released this just a few weeks ago.

  • See [their blog entry][1]
@bingooyong
bingooyong / kubectl.md
Created January 22, 2021 07:27 — forked from so0k/kubectl.md
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@bingooyong
bingooyong / delete_git_submodule.md
Created August 2, 2019 01:42 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
version: '2'
services:
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181:2181"
kafka:
image: wurstmeister/kafka:0.10.0.0
ports:
- "9092:9092"
@bingooyong
bingooyong / multipart_upload.go
Created September 29, 2018 08:49 — forked from mattetti/multipart_upload.go
Example of doing a multipart upload in Go (golang)
package main
import (
"bytes"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
"os"
@bingooyong
bingooyong / PoolingHttpClient
Created June 28, 2018 07:45 — forked from arganzheng/PoolingHttpClient
An HttpClient with PoolingHttpClientConnectionManager
package org.opentsdb.client;
import static com.google.common.base.Preconditions.checkArgument;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import org.apache.commons.lang.StringUtils;
import org.apache.http.HeaderElement;
import org.apache.http.HeaderElementIterator;
# /etc/logrotate.d/openresty
# logrotate -d -f /etc/logrotate.d/openresty
/usr/local/openresty/nginx/logs/*log {
create 0644 nginx nginx
daily
rotate 7
missingok
notifempty
compress