Skip to content

Instantly share code, notes, and snippets.

View mmitech's full-sized avatar
💭
I may be slow to respond.

Mourad Ilyes Mlik mmitech

💭
I may be slow to respond.
View GitHub Profile
@mmitech
mmitech / readydedis.com.conf
Created November 26, 2022 12:37 — forked from Bharat-B/readydedis.com.conf
nGINX rewrite rules for whmcs 8
server {
listen 80 default_server;
server_name readydedis.com www.readydedis.com;
return 301 https://readydedis.com$request_uri;
}
# HTTPS server
#
server {
listen 443;
@mmitech
mmitech / my.cnf
Created November 8, 2022 05:10 — forked from kanibaspinar/my.cnf
Mysql My.cnf Optimization - Best Performance For 1000 + Sites Web Server
# Optimized MySQL configuration for cPanel servers by Kani Baspinar - Updated June 2016
#
# The settings provided below are a starting point for a 24GB RAM server with 8 CPU cores.
# If you have less or more resources available you MUST adjust accordingly to save CPU, RAM and disk I/O usage.
# To fine tune these settings for your system, use MySQL DB diagnostics tools like:
# Test your configuration ; https://launchpad.net/mysql-tuning-primer
# or
# http://blog.mysqltuner.com/download/
# Note that if there is NO comment beside a setting, then you don't need to adjust it.
#
@mmitech
mmitech / inotify-channel-backup.md
Created July 29, 2020 10:33 — forked from alexbosworth/inotify-channel-backup.md
Backup channel.backup file using systemd and inotify

LND backup script for channel.backup using inotify

Install inotify

sudo apt install inotify-tools

Create script to watch for changes and copy on change

@mmitech
mmitech / 00-MINING.md
Created February 6, 2020 13:11 — forked from gboddin/00-MINING.md
Mining optimisation under Linux

Mining under linux

Disclaimer

I'm in no case responsible for fried hardware, erased software or burning down houses. Make sure your miners are always well cooled.

General recommendation

Though you can easily mix nVidia and AMD in the same rig with Linux, it's recommended to use a different thread for each platform so a Driver crash doesn't bring the whole rig down. It should be noted however, that some mining software have trouble when both architecture are found on the same rig.

@mmitech
mmitech / 1_context.md
Last active April 1, 2019 09:12 — forked from dexX7/1_context.md
Token based 2-of-3 multisig arbitration with Omni Core

Context:

  • Let Alice be the seller of an item or service, and Bob the buyer

  • Trent is a service operator, who has the role of an arbitrator

  • Alice wants to deal in TetherUSD

  • Bob's address is mkXZ1FYBNuvrqMEE2PLzJkS39T6w7CouFH, which is funded with TetherUSD

#!/bin/bash
#
# Adds Cloudflare IPV4 addresses to the Inbound rules of a AWS Security Group
#
## defining helper functions first
# show usage
show_usage() {
@mmitech
mmitech / nginx.conf
Created August 3, 2017 11:33 — forked from calebwoods/nginx.conf
Sample Nginx config for deployment of Angular.js app
server { listen 80;
server_name example.com;
access_log /var/log/example.com/nginx.access.log;
error_log /var/log/example.com/nginx.error.log;
root /var/www/apps/example.com/public;
charset utf-8;
location / {
rewrite ^ https://$host$request_uri? permanent;
}
@mmitech
mmitech / nginx-tuning.md
Created August 3, 2017 10:29 — 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.

0x080F411222C9F010D9c8fA053cf4c350E49609F0

Keybase proof

I hereby claim:

  • I am mmitech on github.
  • I am mmitech (https://keybase.io/mmitech) on keybase.
  • I have a public key ASC_rgi1QLkJ1Ve5t5NTlmO-llXeBt6xKYgihac4Y9mVXgo

To claim this, I am signing this object: