Skip to content

Instantly share code, notes, and snippets.

@domezchoc
domezchoc / th-address.json
Created November 20, 2023 04:02 — forked from mennwebs/th-address.json
Thai Address from Postal Code - JSON
This file has been truncated, but you can view the full file.
[
{
"zipCode": "10100",
"subDistrictList": [
{
"subDistrictId": "100801",
"districtId": "1008",
"provinceId": "10",
"subDistrictName": "ป้อมปราบ"
},
@domezchoc
domezchoc / downloads.csv
Created November 25, 2019 16:56 — forked from d3noob/.block
Simple Difference Chart
date_entered downloaded book_name
2015-04-19 5481 R Programming for Data Science
2015-04-19 23751 The Elements of Data Analytic Style
2015-04-20 5691 R Programming for Data Science
2015-04-20 23782 The Elements of Data Analytic Style
2015-04-21 6379 R Programming for Data Science
2015-04-21 23820 The Elements of Data Analytic Style
2015-04-22 7281 R Programming for Data Science
2015-04-22 23857 The Elements of Data Analytic Style
2015-04-23 7554 R Programming for Data Science
@domezchoc
domezchoc / nginx-tuning.md
Created May 28, 2019 05:05 — 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.

@domezchoc
domezchoc / wkhtmltopdf.sh
Created January 3, 2019 18:43 — forked from Rajeshr34/wkhtmltopdf.sh
Wkhtmltopdf With Patched QT Setup Ubuntu 16+
cd ~
apt-get install libfontenc1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig -y
#https://github.com/wkhtmltopdf/wkhtmltopdf/releases
#replace arch
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb
apt --fix-broken install
@domezchoc
domezchoc / ArrayFunctions.mq4
Created December 16, 2017 08:32 — forked from currencysecrets/ArrayFunctions.mq4
Array utility functions for MetaTrader 4. Helpful functions for doing some of the repetitive tasks in MQL.
/*
* clearIntArray
* This function deletes all items in array (sets it to 0) and resizes array according to size (default = 1).
* @param int& theArray - passing the array by reference
* @param int size - size of the array (default = 1)
* @return int blank array of size
*/
int clearIntArray( int& theArray[], int size = 0 ) {
ArrayResize( theArray, size );
if ( size > 0 ) { ArrayInitialize( theArray, 0 ); }