Skip to content

Instantly share code, notes, and snippets.

View goodjob1114's full-sized avatar

Randy Chen goodjob1114

View GitHub Profile
@goodjob1114
goodjob1114 / nginx-tuning.md
Created June 3, 2019 02:59 — 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.

@goodjob1114
goodjob1114 / Gemfile
Created May 30, 2019 09:58 — forked from rmosolgo/Gemfile
GraphQL Ruby Subscriptions
source 'https://rubygems.org'
gem "graphql", github: "rmosolgo/graphql-ruby", branch: "subscriptions"
gem "sinatra"
gem "thin"
@goodjob1114
goodjob1114 / influxdb.conf
Last active January 25, 2019 07:37 — forked from acherunilam/influxdb.conf
Nginx config for InfluxDB HA
worker_processes 5;
worker_rlimit_nofile 8192;
events {
worker_connections 4096;
}
http {
client_max_body_size 20M;
@goodjob1114
goodjob1114 / Makefile.config
Last active March 26, 2018 09:47
make config for caffe with conda and python3.6 env
## Refer to http://caffe.berkeleyvision.org/installation.html
# Contributions simplifying and improving our build system are welcome!
# cuDNN acceleration switch (uncomment to build with cuDNN).
USE_CUDNN := 1
# CPU-only switch (uncomment to build without GPU support).
# CPU_ONLY := 1
# uncomment to disable IO dependencies and corresponding data layers
@goodjob1114
goodjob1114 / README.md
Created October 10, 2017 16:33 — forked from bsodmike/README.md
OC Nvidia GTX1070s in Ubuntu 16.04LTS for Ethereum mining

Following mining and findings performed on EVGA GeForce GTX 1070 SC GAMING Black Edition Graphics Card cards.

First run nvidia-xconfig --enable-all-gpus then set about editing the xorg.conf file to correctly set the Coolbits option.

# /etc/X11/xorg.conf
Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
@goodjob1114
goodjob1114 / stuns
Created June 8, 2016 09:03 — forked from yetithefoot/stuns
STUN+TURN servers list
{url:'stun:stun01.sipphone.com'},
{url:'stun:stun.ekiga.net'},
{url:'stun:stun.fwdnet.net'},
{url:'stun:stun.ideasip.com'},
{url:'stun:stun.iptel.org'},
{url:'stun:stun.rixtelecom.se'},
{url:'stun:stun.schlund.de'},
{url:'stun:stun.l.google.com:19302'},
{url:'stun:stun1.l.google.com:19302'},
{url:'stun:stun2.l.google.com:19302'},
@goodjob1114
goodjob1114 / main.go
Created April 13, 2016 03:47 — forked from manishtpatel/main.go
GoLang Encrypt string to base64 and vice versa using AES encryption.
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/base64"
"fmt"
"io"
)
@goodjob1114
goodjob1114 / client.go
Created February 1, 2016 07:33 — forked from spikebike/client.go
TLS server and client
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io"
"log"
)
@goodjob1114
goodjob1114 / install-golang-by-gvm.sh
Last active January 28, 2016 08:58
install-golang-by-gvm
#!/bin/bash
case ${OSTYPE} in
linux-gnu)
r=$(lsb_release -si)
if [ $r == "Ubuntu" ] || [ $r == "Debian" ]; then
sudo apt-get install -y binutils bison gcc make git
else
echo "Not Ubuntu..."
fi