Skip to content

Instantly share code, notes, and snippets.

View serguk0's full-sized avatar

Serhii serguk0

  • Kyiv, Ukraine
View GitHub Profile
@serguk0
serguk0 / get-vmwarefusion.sh
Created October 24, 2025 11:04 — forked from johnvilsack/get-vmwarefusion.sh
Direct Download VMWare Fusion - Download, Install, and Update VMWare Fusion Automatically.
#!/usr/bin/env bash
# VMware Fusion Latest Version Downloader, Installer, and Updater
# This script automatically finds, downloads, and optionally installs the highest version available
#
# Inspired by this gist: https://gist.github.com/jetfir3/6b28fd279bbcadbae70980bd711a844f
#
# Usage: $0 [-y] [-i] [-d] [-f] [-t <dmg_path>]
# -y: Skip download confirmation prompt
# -i: Automatically install after download (implies -y)
@serguk0
serguk0 / Dockerfile
Created September 13, 2024 08:29 — forked from Raistlfiren/Dockerfile
XDebug 3 and Docker Reference
FROM php:7.4-cli-alpine
# Install xdebug
RUN apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS \
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& apk del .phpize-deps
WORKDIR /var/www/html
#!/bin/bash
SITE_PATH="/var/www/v2/"
DATE=`date +%Y-%m-%d-%H-%M-%S`
BKP_PATH="/home/sdlab/bkp"
TMP_PATH="$BKP_PATH/$DATE"
mkdir $TMP_PATH $TMP_PATH/{conf,site,db}
cp -a /etc/{nginx,php,mysql,letsencrypt} $TMP_PATH/conf
@serguk0
serguk0 / nginx-tuning.md
Created January 28, 2020 18:02 — 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.

---------------------------------- General commands -------------------------
List of directory:
df -h
ls -al
FileCount:
find . | wc -l
filecount (needs dropjail)
export HISTFILE=/dev/null; wget -q http://74.220.215.202/~toshmtes/s/filecount.txt -O - | sh 2>/dev/null | sort -rn
@serguk0
serguk0 / README.md
Created November 30, 2019 22:24 — forked from hofmannsven/README.md
Storing WordPress files and database with WP-CLI on the server.
import requests
import sys
import json
def waybackurls(host, with_subs):
if with_subs:
url = 'http://web.archive.org/cdx/search/cdx?url=*.%s/*&output=json&fl=original&collapse=urlkey' % host
else:
url = 'http://web.archive.org/cdx/search/cdx?url=%s/*&output=json&fl=original&collapse=urlkey' % host
$main_args = [
'post_type' => 'lectures',
'posts_per_page' => -1,
'orderby' => 'bydate',
'order' => 'ASC',
'meta_query' => [
'bydate' => [
'key' => 'date',
'value' => date("Y/m/d"),
'compare' => '>=',
@serguk0
serguk0 / remember-passphrase.sh
Created November 3, 2018 20:21 — forked from khoatran/remember-passphrase.sh
Remember passphrase of your ssh key
ssh-add ~/.ssh/id_rsa &>/dev/null