Skip to content

Instantly share code, notes, and snippets.

View marcelobrake's full-sized avatar
🔥

Marcelo Divaldo Brake marcelobrake

🔥
View GitHub Profile
@marcelobrake
marcelobrake / nginx-tuning.md
Created June 30, 2022 12:04 — 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.

@marcelobrake
marcelobrake / .zshrc
Created March 31, 2020 20:34 — forked from diego3g/.zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
export ANDROID_HOME=~/Android/Sdk
export PATH="$PATH:$ANDROID_HOME/tools"
export PATH="$PATH:$ANDROID_HOME/platform-tools"
# Path to your oh-my-zsh installation.
export ZSH="/Users/diegofernandes/.oh-my-zsh"
export PATH="$PATH:/usr/local/bin"
@marcelobrake
marcelobrake / install-pptp-vpn-server.sh
Created March 16, 2020 15:27 — forked from moeiscool/install-pptp-vpn-server.sh
Install PPPTP VPN Server on Ubuntu 18.04
echo "======================="
echo "Installing PPTP VPN Server..."
echo "======================="
apt install pptpd -y
echo "Setting VPN Server IP : localip 172.16.0.1"
if grep -q "localip 172.16.0.1" /etc/pptpd.conf; then
echo "Already set."
else
sed -i 's/localip/#localip/g' /etc/pptpd.conf
echo "localip 172.16.0.1" >> /etc/pptpd.conf
@marcelobrake
marcelobrake / Dockerfile
Created May 31, 2019 19:59
php:7.2-rc-zts-alpine +pthreads +xdebug
FROM php:7.2-rc-zts-alpine
ARG APP_USER_USERNAME=app
RUN apk update && apk add --no-cache \
sudo bash \
g++ make autoconf \
libxml2-dev icu-dev curl-dev pcre-dev
RUN adduser -D -s /bin/bash $APP_USER_USERNAME \
SELECT getdate(), @@servername, db_name(db_id()), object_name(B.Object_id), B.Name, avg_fragmentation_in_percent,page_Count,fill_factor
FROM sys.dm_db_index_physical_stats(db_id(),null,null,null,null) A
join sys.indexes B on a.object_id = B.Object_id and A.index_id = B.index_id
WHERE avg_fragmentation_in_percent > 5 and page_count > 1000
ORDER BY page_count DESC, avg_fragmentation_in_percent DESC
--entre 5 e 30: reorganize
-- > 30: rebuild