Skip to content

Instantly share code, notes, and snippets.

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

Habeeb doxt3r

🏠
Working from home
View GitHub Profile
@doxt3r
doxt3r / ssl_tricks.txt
Created October 18, 2022 07:44
Remove passphrase from certificate key
openssl rsa -in [my.key] -out [new.key]
Enter the passphrase
The output file new.key should now be unencrypted
@doxt3r
doxt3r / .htaccess
Created January 30, 2023 13:04 — forked from jennimckinnon/.htaccess
Restrict Direct Access to Plugin and Theme PHP files in WordPress. Source: https://www.acunetix.com/websitesecurity/wordpress-security-top-tips-secure-wordpress-application/
RewriteCond %{REQUEST_URI} !^/wp-content/plugins/file/to/exclude\.php
RewriteCond %{REQUEST_URI} !^/wp-content/plugins/directory/to/exclude/
RewriteRule wp-content/plugins/(.*\.php)$ - [R=404,L]
RewriteCond %{REQUEST_URI} !^/wp-content/themes/file/to/exclude\.php
RewriteCond %{REQUEST_URI} !^/wp-content/themes/directory/to/exclude/
RewriteRule wp-content/themes/(.*\.php)$ - [R=404,L]
@doxt3r
doxt3r / full-ls-date.sh
Created February 15, 2023 10:48 — forked from wellington1993/full-ls-date.sh
ls linux with date year
ls -lahot --full-time
<?php
namespace AppBundle\Form\EventListener;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Doctrine\ORM\EntityManager;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\Form\FormEvent;
class AddEntityChoiceSubscriber implements EventSubscriberInterface
@doxt3r
doxt3r / setup.sh
Created September 17, 2025 17:26
vast ia image startup
#!/usr/bin/env bash
set -euo pipefail
export DEBIAN_FRONTEND=noninteractive
echo "[setup] System deps"
apt-get update -y
apt-get install -y --no-install-recommends python3-pip python3-venv git ffmpeg jq curl
python3 -m pip install --upgrade pip
cd /workspace