Skip to content

Instantly share code, notes, and snippets.

View feryardiant's full-sized avatar
🎯
Focusing

Fery Wardiyanto feryardiant

🎯
Focusing
View GitHub Profile
@denji
denji / nginx-tuning.md
Last active April 7, 2025 12:04
NGINX tuning for best performance

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.

@callumacrae
callumacrae / build-tools.md
Last active October 25, 2023 15:14
Build tools written in JavaScript
@hok00age
hok00age / Android Get Certificate Function
Last active May 7, 2022 04:08
Taruh code ini di Class Activity. Return berupa string dapat Anda masukkan di perujuk http://rajaongkir.com/akun/ubahperujuk
private String getCertificate() {
String certificate = null;
PackageManager pm = this.getPackageManager();
String packageName = this.getPackageName();
int flags = PackageManager.GET_SIGNATURES;
PackageInfo packageInfo = null;
try {
packageInfo = pm.getPackageInfo(packageName, flags);
} catch (NameNotFoundException e) {
}
@mul14
mul14 / delete_node_modules.sh
Last active July 23, 2018 15:04
Delete all node_modules and bower_components directories
#!/usr/bin/env sh
find . -maxdepth 2 -type d -name node_modules -name bower_components -print0 | xargs -0 rm -rf
@kuanghan
kuanghan / docker_lxc.md
Created January 3, 2019 18:41
Setting up docker to run in a PRIVILEGED LXC container

Setting up docker to run in a PRIVILEGED LXC container

Set up a privileged container

Create container

Let's call the container docker_test1.

$ sudo lxc-create -t download -n docker_test1
...
Follow the prompts on the screen to set up the new container.
@sindresorhus
sindresorhus / esm-package.md
Last active April 7, 2025 16:23
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.