Skip to content

Instantly share code, notes, and snippets.

View tuyenv's full-sized avatar

Tuyen Vuong tuyenv

View GitHub Profile
@tuyenv
tuyenv / custom-social-share.html
Created August 15, 2019 05:21 — forked from mrtonyhuynh/custom-social-share.html
Custom Social Share Button with Callback
<html>
<head>
<title>Social Share</title>
</head>
<body>
<h2>Custom Social Share Button with Callback</h2>
<button id="share-facebook">Share on Facebook</button>
<button id="share-twitter">Share on Twitter</button>
@tuyenv
tuyenv / eu_cookie_banner.js
Created June 5, 2019 14:42 — forked from bavington/eu_cookie_banner.js
Simple EU Cookie Law Banner JavaScript
@tuyenv
tuyenv / install_elasticsearch_osx.md
Created August 20, 2018 15:49 — forked from djonsson/install_elasticsearch_osx.md
OS X installation instructions for Elasticsearch + Kibana + Marvel

What is this?

Following this guide will set up a local Elasticsearch with Kibana and Marvel using Homebrew and Homebrew Cask

Prerequisites

If you already have Java installed on your system, skip steps Install Cask and Install Java

If you already have Java and Homebrew installed on your system, skip steps Prerequisites, start at Install Elasticsearch and Kibana after running $ brew update

Install Homebrew

  • $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@tuyenv
tuyenv / nginx-tuning.md
Created January 2, 2018 08: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.

@tuyenv
tuyenv / nginx.conf
Created November 20, 2017 23:30 — forked from denys281/nginx.conf
phpmyadmin nginx virtual host (php-fpm)
server {
# Listen on port 81
listen 81;
# Server name being used (exact name, wildcards or regular expression)
# server_name phpmyadmin.my;
root /usr/share/phpmyadmin;
@tuyenv
tuyenv / download.php
Created November 16, 2017 10:15 — forked from eliah-w/download.php
PHP Download Script
<?php
##################################################################################################
##################################################################################################
## Description: PHP Download Controller ##
## Author: vanita5 <mail@vanita5.de> ##
## Date: Nov 2014 ##
## File: download.php ##
## Version: 1.0 ##
## ##
## ##