Skip to content

Instantly share code, notes, and snippets.

@frengky
frengky / linux.md
Created August 9, 2023 04:07
Linux command snippets

List rpm order by size

rpm -qa --queryformat '%10{size} - %-25{name} \t %{version} \t %{os} \n' | sort -rh | head -25 | awk '{print $1/1024/1024, $2, $3, $4}'
@frengky
frengky / minio.md
Created July 22, 2022 10:11
S3 Compatible Object Storage Server (MinIO)

S3 Compatible Object Storage Server (MinIO)

1. Download minio and mc binary for linux

Put the binary in /opt/minio/bin:

wget https://dl.min.io/server/minio/release/linux-amd64/minio
wget https://dl.min.io/client/mc/release/linux-amd64/mc
@frengky
frengky / .php-cs-fixer.php
Created February 5, 2022 05:31
PHP-CS-Fixer 3.x Laravel configuration file
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_syntax' => ['syntax' => 'short'],
'no_unused_imports' => true,
'blank_line_after_namespace' => true,
'blank_line_after_opening_tag' => true,
@frengky
frengky / Sourcetree_Rebase.md
Created September 10, 2021 06:13
How to GIT rebase with sourcetree

How to GIT rebase with sourcetree

Sourcetree is a simple and powerfull Git GUI.

After working on a feature with separate branch, we may want to integrating the feature to the master branch using rebase instead of merge, so the overall history will look much cleaner and neater at the end.

Step 1: Checking out to feature_a branch, right click the master branch and rebase interactively

image

@frengky
frengky / traefik_docker_container_vm.md
Last active November 9, 2020 04:46
Quick guide to configure traefik to access docker container instance running on a virtual machine guest

Configuring Traefik for Container Access

Quick guide to configure traefik to access docker container instance running on a virtual machine guest.

Objectives

Running traefik and docker app containers in a Ubuntu virtual machine guest with IP 192.168.56.101, and be able to access the app containers without any DNS configuration. Traefik should be proxying to the correct container.

Browser on Host --> Nginx on Host --> Traefix on VM --> Container App on VM

@frengky
frengky / s3_compatible_object_storage.md
Last active August 22, 2023 02:41
This is a quick start guide to run a S3 compatible open source object storage server using MinIO

Local S3 Object Storage

This is a quick start guide to run a S3 compatible open source object storage server using MinIO.

References

The docker image used in this guide:

@frengky
frengky / applicationhost.config
Created April 19, 2020 13:01
IIS Express 10 / PHP 7.2 on Windows 10
<?xml version="1.0" encoding="UTF-8"?>
<!--
IIS configuration sections.
For schema documentation, see
%IIS_BIN%\config\schema\IIS_schema.xml.
Please make a backup of this file before making any changes to it.
@frengky
frengky / worker_pool.go
Created April 4, 2019 12:10
Worker pool implementation in Go
package msgr
import (
"log"
)
type Task interface {
execute() (string, error)
}
@frengky
frengky / gzip_params
Last active September 9, 2018 17:35
Nginx configuration for Laravel
# Compression
# Enable Gzip compressed.
gzip on;
# Enable compression both for HTTP/1.0 and HTTP/1.1.
gzip_http_version 1.1;
# Compression level (1-9). 5 is a perfect compromise between size and cpu usage, offering about 75% reduction for most ascii
# files (almost identical to level 9).
@frengky
frengky / phpstorm_settings.txt
Created September 8, 2018 17:18
Php Storm Settings Windows 10
phpstorm64.exe.vmoptions
-----------------------------------------------------
-Dsun.java2d.opengl=true
-Dswing.aatext=true
-Dawt.useSystemAAFontSettings=lcd
right click phpstorm64.exe
-----------------------------------------------------
Change high DPI settings
High DPI scaling override by System (Enhanced)