Skip to content

Instantly share code, notes, and snippets.

View goeroeku's full-sized avatar

Agus Indra Cahaya goeroeku

View GitHub Profile
@goeroeku
goeroeku / nginx.conf
Created January 17, 2019 07:53 — forked from v0lkan/nginx.conf
Configuring NGINX for Maximum Throughput Under High Concurrency
user web;
# One worker process per CPU core.
worker_processes 8;
# Also set
# /etc/security/limits.conf
# web soft nofile 65535
# web hard nofile 65535
# /etc/default/nginx
@goeroeku
goeroeku / nginx-tuning.md
Created January 17, 2019 07:20 — 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.

@goeroeku
goeroeku / VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
Created January 15, 2019 13:16 — forked from Brainiarc7/VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
This gist contains instructions on setting up FFmpeg and Libav to use VAAPI-based hardware accelerated encoding (on supported platforms) for H.264 (and H.265 on supported hardware) video formats.

Using VAAPI's hardware accelerated video encoding on Linux with Intel's hardware on FFmpeg and libav

Hello, brethren :-)

As it turns out, the current version of FFmpeg (version 3.1 released earlier today) and libav (master branch) supports full H.264 and HEVC encode in VAAPI on supported hardware that works reliably well to be termed "production-ready".

@goeroeku
goeroeku / Readme.md
Created December 26, 2018 03:29
Production vue & nodejs
  • Gunakan pm2
  • build vue
yarn build
  • buat server nodejs menggunakan express dan serve-static
yarn add express serve-static
  • jalankan vue menggunakan nodejs
@goeroeku
goeroeku / arch_gpu_passthrough.MD
Created October 2, 2018 23:07 — forked from heppu/arch_gpu_passthrough.MD
Arch GPU passthrough

Install rpmextract

sudo pacman -Suy rpmextract

Get lates edk2.git-ovmf-x64

wget https://www.kraxel.org/repos/jenkins/edk2/edk2.git-ovmf-x64-XXXXXX.noarch.rpm
@goeroeku
goeroeku / Installation.sh
Created August 7, 2018 01:04 — forked from cardil/Installation.sh
Linux NVidia Optimus with external monitor - enable/disable scripts tested on Ubuntu. Source article: http://www.unixreich.com/blog/2013/linux-nvidia-optimus-on-thinkpad-w520w530-with-external-monitor-finally-solved
# You will need latest NVIDIA drivers installed. At the time of writing, version is 331.20.
# On ubuntu 13.10, it looks like this:
sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-331
# Now we need to install bumblebee:
sudo add-apt-repository ppa:bumblebee/stable
sudo apt-get install bumblebee bumblebee-nvidia bbswitch-dkms
@goeroeku
goeroeku / Dockerfile
Created July 28, 2018 00:14 — forked from michaelneu/Dockerfile
docker-compose configuration for PHP with NGINX and MySQL, including sendmail, MailDev and phpmyadmin
# see https://github.com/cmaessen/docker-php-sendmail for more information
FROM php:5-fpm
RUN apt-get update && apt-get install -q -y ssmtp mailutils && rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install mysql mysqli sysvsem
RUN pecl install xdebug-2.5.5 \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
@goeroeku
goeroeku / Installasi.md
Last active July 23, 2019 23:22
All about Docker & Ranches on Manjaro

Docker

a. Install Docker

sudo pacman -S docker docker-machine docker-compose

b. Jalankan Service

sudo systemctl start docker

c. Tambahkan current user ke group docker agar pada saat menjalankan tidak perlu menggunakan sudo

@goeroeku
goeroeku / selenium_py_functions.py
Created May 12, 2018 23:46 — forked from ChrisMuir/selenium_py_functions.py
Useful functions for web scraping with Selenium and Chromedriver in Python
# -*- coding: utf-8 -*-
## Collection of useful functions for working with Selenium and Chromedriver
## in Python. These functions are geared toward web scraping.
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.alert import Alert
from selenium.webdriver.support.ui import WebDriverWait
@goeroeku
goeroeku / Yobit.js
Created April 4, 2018 09:24 — forked from nxmad/Yobit.js
if (window._bot != undefined) {
// alert('Bot added before, if something goes wrong try reload the page')
}
window._bot = true
window._martingale = 2.05
window._variant = Math.random() >= 0.5 ? 1 : 0
// window._variants = ['Roll < 49', 'Roll > 51']