Skip to content

Instantly share code, notes, and snippets.

View zoghal's full-sized avatar
🏠
Working from home

Saleh Souzanchi zoghal

🏠
Working from home
View GitHub Profile
@zoghal
zoghal / my.cnf
Created August 30, 2023 16:40 — forked from fevangelou/my.cnf
Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers)
# === Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers) ===
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated December 2021 ~
#
#
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
@hamid-rostami
hamid-rostami / README.md
Last active February 10, 2024 04:19
wireguard over TCP

To pass wireguard's traffic through a TCP tunnel by using udp2raw

Requirements

For Arch linux, install udp2raw by pacman: pacman -S udp2raw

For Debian or Ubuntu, you can use a binary release from: https://github.com/wangyu-/udp2raw/releases

@Clicketyclick
Clicketyclick / progress_bar.php
Last active February 28, 2024 02:44 — forked from mayconbordin/progress_bar.php
PHP CLI progress bar in 5 lines of code
<?php
/**
* @brief Return a progress bar with the length of $width
*
* @param [in] $done count for progress
* @param [in] $total Maximum of progress
* @param [in] $info Prefix text
* @param [in] $width Width of progress bar (w/o prefix)
* @param [in] $off Char to indicate not processed yet
* @param [in] $on Char to indecate process
@mcsaeid
mcsaeid / Twitter.css
Last active April 25, 2022 18:27
Minimal Twitter
/* حذف لوگوی توئیتر */
[aria-label="Twitter"],
[aria-label="توییتر"] {
display: none;
}
/* ستون سمت چپ */
/* Explore و ،Bookmarks ،Lists چیزهایی که استفادهٔ کمتری دارن، شامل */
@iamvee
iamvee / سبزی.csv
Last active September 13, 2023 09:41
خورشت کلم پلو کوکو دم‌پخت ماهی‌پلو قلیه ماهی آش کوفته خورشت کرفس دلمه سوپ آش غوره آش ماست آش شلغم ترش‌تره
برگ چغندر TRUE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE
ترخون FALSE TRUE FALSE TRUE FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE
تره TRUE TRUE TRUE TRUE FALSE FALSE TRUE TRUE FALSE TRUE TRUE TRUE TRUE TRUE FALSE
جعفری TRUE FALSE TRUE FALSE TRUE FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
ریحان FALSE TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE
سیر FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
شاهی FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE
شلغم FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE
شملیز TRUE FALSE FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
@thiagodiniz
thiagodiniz / html_parser.py
Created July 4, 2019 18:07
HTML 2 DOCX @ Python
# -*- coding: utf-8 -*-
import io
import requests
from bs4 import NavigableString, BeautifulSoup
from docx import Document as DocxDocument
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.shared import Cm, Pt, Mm
from docx.image.exceptions import UnrecognizedImageError
from lxml import etree
@phillipkent
phillipkent / convert-docx-to-html.py
Created April 17, 2019 12:27
Python code using the python-docx module to convert a DOCX file to HTML
# Converts a docx file with tables and images to (simple) HTML
# ORIGINAL CODE BY DAVID SSALI AT SOURCE: https://medium.com/@dvdssali/docx-to-html-1374eb6491a1
#
# Requires the Python module 'python-docx' <https://python-docx.readthedocs.io>
#
# Example use:
# >>> s = convert('./SOURCEDIR', 'SAMPLE.docx')
# >>> print(s)
# or
# $ python .\convert-docx-to-html.py > temp.html
@ApoGouv
ApoGouv / 00_wp-optimizations-security-n-cleanup.md
Last active December 21, 2023 10:05
WP - Optimizations, Security hardening and Cleanup.

** WP - Optimizations, Security hardening and Cleanup **

Here you can find a a list of WP optimization and cleanup functions and methodology.

1.  .htaccess
  ** Security **
- Disable the server signature
- Disable directory browsing
- Force https to your site.
@sapics
sapics / index.html
Last active April 11, 2019 03:15 — forked from lehni/index.html
<!DOCTYPE html>
<html>
<head>
<!--
Copyright (c) 2014-2017, Jan Bösenberg & Jürg Lehni
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
<!DOCTYPE html>
<html>
<head>
<!--
Copyright (c) 2014-2017, Jan Bösenberg & Jürg Lehni
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell