Skip to content

Instantly share code, notes, and snippets.

View xardit's full-sized avatar
🍀

Ardit Hyka xardit

🍀
View GitHub Profile
@xardit
xardit / README.md
Created July 5, 2024 06:28
Ubuntu 24 change SSH port

Ubuntu 24 change SSH port

Steps to change ssh listening port

  1. Change stream port
vi /lib/systemd/system/ssh.socket
@xardit
xardit / docker-compose.yml
Created June 27, 2024 15:43 — forked from pyrou/docker-compose.yml
Use https://traefik.me SSL certificates for local HTTPS without having to touch your /etc/hosts or your certificate CA.
version: '3'
services:
traefik:
restart: unless-stopped
image: traefik:v2.0.2
ports:
- "80:80"
- "443:443"
labels:
- "traefik.http.services.traefik.loadbalancer.server.port=8080"
@xardit
xardit / month2sq.js
Last active June 19, 2024 16:03
month2sq
const month2sq = {
January: 'Janar',
February: 'Shkurt',
March: 'Mars',
April: 'Prill',
May: 'Maj',
June: 'Qershor',
July: 'Korrik',
August: 'Gusht',
September: 'Shtator',
@xardit
xardit / create.md
Last active February 10, 2024 21:53
Virtual Box create physicaldrive0.vmdk disk with cmd to access raw disk

Run only on cmd > run as admin

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" createmedium disk --filename physicaldrive0.vmdk --format=VMDK --variant RawDisk --property RawDrive=\\.\PhysicalDrive0

When adding to virtual disk manager on virtual box, make sure to run virtual box directly from the .exe file as administrator

To list Host drives using vboxmanage.exe

@xardit
xardit / copy.sh
Created February 4, 2024 20:55
Docker quick copy local folder (a mysql folder) to existing volume
#!/bin/bash
# test
docker run -it --rm -v wordpress-nginx-docker_mysql-data:/dest alpine
# delete
docker run --rm -v wordpress-nginx-docker_mysql-data:/dest -w /source alpine rm -rf /dest/*
# copy
docker run --rm -v $PWD:/source -v wordpress-nginx-docker_mysql-data:/dest -w /source alpine cp dbdata/* /dest/
@xardit
xardit / config.txt
Last active October 29, 2024 08:44
Equalizer APO - HyperX Cloud III - Optimize common usage - Optimize Valorant gameplay sounds
# AutoEQ.app for HyperX Cloud III
# GraphicEQ: 20 -1.2; 21 -0.9; 22 -0.7; 23 -0.6; 24 -0.5; 26 -0.3; 27 -0.3; 29 -0.2; 30 -0.2; 32 -0.3; 34 -0.5; 36 -0.6; 38 -0.8; 40 -1.1; 43 -1.5; 45 -1.8; 48 -2.2; 50 -2.5; 53 -2.8; 56 -3.1; 59 -3.3; 63 -3.6; 66 -3.7; 70 -3.9; 74 -4.1; 78 -4.2; 83 -4.2; 87 -4.2; 92 -4.1; 97 -3.9; 103 -3.7; 109 -3.6; 115 -3.4; 121 -3.3; 128 -3.3; 136 -3.4; 143 -3.5; 151 -3.6; 160 -3.8; 169 -4; 178 -4.2; 188 -4.5; 199 -4.8; 210 -5; 222 -5.4; 235 -5.7; 248 -5.9; 262 -6.1; 277 -6.3; 292 -6.6; 309 -6.8; 326 -7; 345 -7.1; 364 -7.2; 385 -7.3; 406 -7.5; 429 -7.5; 453 -7.6; 479 -7.6; 506 -7.6; 534 -7.7; 565 -7.8; 596 -8; 630 -8.3; 665 -8.7; 703 -9; 743 -9.1; 784 -9.3; 829 -9.4; 875 -9.4; 924 -9.4; 977 -9.3; 1032 -9.1; 1090 -8.9; 1151 -8.9; 1216 -9.1; 1284 -9.2; 1357 -9.3; 1433 -9.4; 1514 -9.5; 1599 -9.6; 1689 -9.6; 1784 -9.6; 1885 -9.2; 1991 -8.4; 2103 -7.6; 2221 -6.9; 2347 -6.4; 2479 -6.3; 2618 -5.9; 2766 -4.9; 2921 -4.2; 3086 -4.3; 3260 -5.5; 3443 -5.8; 3637 -4.3; 3842 -2.9; 4058 -2.7; 4287 -3.7;
@xardit
xardit / run.py
Created December 24, 2023 15:09
Remove recursively md5 hash string from filenames - Python script
"""
Remove recursively md5 hash string from filenames on files and directories from notion export
and reuse them directly on obsidian vault.
The md5 string is added by Notion on export by default!
@by Ardit
"""
import os
import re
@xardit
xardit / functions.php
Created July 4, 2023 12:26
WP Custom Upload MIME types
<?php
function my_custom_mime_types( $mimes ) {
// New allowed mime types.
$mimes['svg'] = 'image/svg+xml';
$mimes['svgz'] = 'image/svg+xml';
$mimes['doc'] = 'application/msword';
// Optional. Remove a mime type.
unset( $mimes['exe'] );
@xardit
xardit / functions.php
Created June 30, 2023 13:17
WP Disable XMLRPC via functions
<?php
// disable xmlrpc
add_filter( 'xmlrpc_enabled', '__return_false' );
@xardit
xardit / script.js
Created June 25, 2023 17:21
WhatsApp Icon Floating in Javascript
(function(d) {
var phone = '+1234567';
var text = "Hello, I'm interested for: " + window.location.href;
if(!window.location.pathname.startsWith("/products")){
text = "Hello, I'm interested..";
}
var link = d.createElement('a');
var style = d.createElement('style');