Skip to content

Instantly share code, notes, and snippets.

@yauri-io
yauri-io / install.sh
Last active April 26, 2021 02:52
NGINX Amplify Agent Ubuntu 20.x
#!/bin/sh
#
# NGINX Amplify Agent install script
#
# Copyright (C) Nginx, Inc.
#
# Edited using reference in https://github.com/nginxinc/nginx-amplify-agent/issues/181
packages_url="https://packages.amplify.nginx.com"
@yauri-io
yauri-io / idea.properties
Last active April 21, 2021 22:33 — forked from ScriptedAlchemy/idea.propertie
custom IntelliJ IDEA properties
# custom IntelliJ IDEA properties
editor.zero.latency.typing=true
idea.max.intellisense.filesize=3500
idea.cycle.buffer.size=2048
@yauri-io
yauri-io / idea.vmoptions
Created August 12, 2020 12:12 — forked from ScriptedAlchemy/idea.vmoptions
improved perf vmoptions
-Xms1024m
-Xmx3072m
-Xss64m
-XX:ReservedCodeCacheSize=512m
-XX:+UseCompressedOops
-XX:NewRatio=2
-Dfile.encoding=UTF-8
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=250
-XX:NewSize=512m
@yauri-io
yauri-io / taiwan district zip JSON array
Created May 30, 2020 18:53 — forked from abc873693/taiwan_districts.json
台灣行政區郵遞區號 JSON
[
{
"districts":[
{
"zip":"100",
"name":"中正區"
},
{
"zip":"103",
"name":"大同區"
@yauri-io
yauri-io / nginx-tuning.md
Created February 22, 2020 21:34 — 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.

@yauri-io
yauri-io / fileRename.js
Last active February 1, 2020 16:08
Renaming all files inside a folder (MacOS) using NodeJS
'use strict'
const Fs = require('fs')
const Path = require('path')
const filePath = process.env.filePath
if (!filePath) {
throw Error ('Please set filePath!')
}
@yauri-io
yauri-io / countries.json
Created July 22, 2019 20:23 — forked from erdem/countries.json
Country list as JSON format. fields: name, coordinates, timezones, country code and capital resource: https://github.com/mledoze/countries
[
{
"timezones": [
"America/Aruba"
],
"latlng": [
12.5,
-69.96666666
],
"name": "Aruba",
@yauri-io
yauri-io / gist:8477112a589c6791b35c966291f87faa
Created January 7, 2019 13:51 — forked from entaroadun/gist:1653794
Recommendation and Ratings Public Data Sets For Machine Learning

Movies Recommendation:

Music Recommendation: