Skip to content

Instantly share code, notes, and snippets.

View harimau99's full-sized avatar
:octocat:
Mercenary on Cloud & Security that do code at anywhere available for hire

Najoe harimau99

:octocat:
Mercenary on Cloud & Security that do code at anywhere available for hire
View GitHub Profile
@harimau99
harimau99 / .gitlab-ci.yml
Created September 12, 2019 08:54 — forked from shaliko/.gitlab-ci.yml
GitLab Continuous Integration with Capistrano 4
image: ruby:2.4
stages:
- deploy
deploy_staging:
environment: staging
stage: deploy
script:
- which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )
- eval $(ssh-agent -s)
@harimau99
harimau99 / nginx.conf
Created July 8, 2019 20:55 — 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
@harimau99
harimau99 / Instruction.sh
Created June 26, 2019 11:47 — forked from jay7793/Instruction.sh
Install Laravel 5.6 With PHP7.2 NGINX and PHP7.2-FPM on Ubuntu 16.04
# Install software-properties-common package to give us add-apt-repository package
sudo apt-get install -y software-properties-common
# Install latest nginx version from community maintained ppa
sudo add-apt-repository ppa:nginx/stable
# Update packages after adding ppa
sudo apt-get update
# Install nginx
@harimau99
harimau99 / nginx-tuning.md
Created June 19, 2019 08:55 — 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.

@harimau99
harimau99 / viewer.rst
Created April 24, 2019 04:33
Viewer or GUI of FDN with Ryu

Topology Viewer

ryu.app.gui_topology.gui_topology provides topology visualization.

This depends on following ryu applications.

===================== ================================================= ryu.app.rest_topology Get node and link data.

@harimau99
harimau99 / docker-compose.yml
Created April 9, 2019 10:41 — forked from ljdelight/docker-compose.yml
docker-compose for gitlab and jenkins
#
# Simple docker-compose file for Gitlab CE and a Jenkins master.
# This is for testing and builds are done on the jenkins master.
#
version: "2"
services:
gitlab:
image: "gitlab/gitlab-ce:8.15.2-ce.0"
@harimau99
harimau99 / mobile_hotspot.py
Created December 27, 2018 10:15 — forked from bizkut/mobile_hotspot.py
Use your mobile phone's data on your pc without tethering. Doesn't need jailbreak or root.
#!/usr/bin/env python
import socket
import select
import threading
HOST = ''
PORT = 50007
# use https or socks5 and use the same protocol on pc
PROXYHOST = 'your proxy server'
PROXYPORT = 8080
@harimau99
harimau99 / functions.php
Created December 11, 2018 04:35 — forked from fldtrace/functions.php
Better, Faster, Responsive Images for Divi – Upload in Divi child theme.
<?php
// enable divi functions
add_action( 'wp_enqueue_scripts', 'my_enqueue_assets' );
function my_enqueue_assets() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}
//add 1440px image size
add_image_size('image_1440', 1440, 9999, false);
@harimau99
harimau99 / get-id-of-main-site-in-wordpress-multisite.php
Created November 4, 2018 03:51 — forked from kellenmace/get-id-of-main-site-in-wordpress-multisite.php
Get the Blog ID of the Main Site in a WordPress Multisite Network
<?php
/*
* Get the Blog ID of the main site in a multisite network.
*
* @return int The blog_id of the main site.
*/
function km_get_main_site_blog_id() {
return get_network()->site_id;
}