Skip to content

Instantly share code, notes, and snippets.

View tahmidbintaslim's full-sized avatar
🎯
Focusing

Tahmid Bin Taslim Rafi tahmidbintaslim

🎯
Focusing
View GitHub Profile
@tahmidbintaslim
tahmidbintaslim / nvmCommands.js
Created June 14, 2024 04:14 — forked from chranderson/nvmCommands.js
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
@tahmidbintaslim
tahmidbintaslim / Disable Frontend on Wordpress
Last active August 4, 2023 08:36 — forked from Marian0/gist:4d689c33164bc9daf0e1
Disable wordpress Frontend by htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !/wp-admin
RewriteCond %{REQUEST_URI} !/wp-includes
RewriteCond %{REQUEST_URI} !/wp-login\.php$
RewriteCond %{REQUEST_URI} !/wp-content
RewriteCond %{REQUEST_URI} !/feed
@tahmidbintaslim
tahmidbintaslim / meta-tags.md
Created May 24, 2023 05:28 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@tahmidbintaslim
tahmidbintaslim / rs_upload_from_url.php
Created April 14, 2023 15:30 — forked from RadGH/rs_upload_from_url.php
Upload a file from a URL to the WordPress media gallery. Supports images, PDFs, and other file types.
<?php
/**
* This function uploads from a URL.
* To upload from a local file path instead
* @see: https://gist.github.com/RadGH/3b544c827193927d1772
*
* Example usage: Upload photo from URL, display the attachment as as html <img>
* $attachment_id = rs_upload_from_url( "http://example.com/images/photo.png" );
* echo wp_get_attachment_image( $attachment_id, 'large' );
@tahmidbintaslim
tahmidbintaslim / converter.php
Created March 29, 2023 03:48 — forked from ChrisButterworth/converter.php
Webp converter for WordPress
<?php
namespace Converter;
use WebPConvert\WebPConvert;
class Converter
{
public $lazy = false;
public function __construct($lazy = false)
@tahmidbintaslim
tahmidbintaslim / add featured img
Created January 13, 2023 07:53 — forked from gmmedia/functions.php
Add featured image column to WP admin panel - posts AND pages
@tahmidbintaslim
tahmidbintaslim / import-optimizations.md
Created December 26, 2022 07:25 — forked from trey8611/import-optimizations.md
WP All Import - Optimize your import speed.
@tahmidbintaslim
tahmidbintaslim / site.conf
Created November 20, 2022 06:55 — forked from inetbiz/site.conf
Nginx configuration for best security and modest performance. Full info on https://terrty.net/2014/ssl-tls-in-nginx/
# read more at https://terrty.net/2014/ssl-tls-in-nginx/
# latest version on https://gist.github.com/paskal/628882bee1948ef126dd/126e4d1daeb5244aacbbd847c5247c2e293f6adf
# security test score: https://www.ssllabs.com/ssltest/analyze.html?d=terrty.net
# your nginx version might not have all directives included, test this configuration before using in production against your nginx:
# $ nginx -c /etc/nginx/nginx.conf -t
server {
# public key, contains your public key and class 1 certificate, to create:
# (example for startssl)
# $ (cat example.com.pem & wget -O - https://www.startssl.com/certs/class1/sha2/pem/sub.class1.server.sha2.ca.pem) | tee -a /etc/nginx/ssl/domain.pem > /dev/null
@tahmidbintaslim
tahmidbintaslim / php.ini
Created October 10, 2022 06:11
Optimized php.ini
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; http://php.net/engine
engine = On