Skip to content

Instantly share code, notes, and snippets.

View ohid's full-sized avatar

Ohidul Islam ohid

View GitHub Profile
@ohid
ohid / Remix.js Self Hosting Instructions.md
Last active July 27, 2025 20:23 — forked from codinginflow/next-self-hosting-instructions.md
Deploy & secure a Next.js app + Postgres DB on a VPS

Self-Hosting Remix.js Tutorial

Follow the instructions below to deploy a Next.js app with a local PostgreSQL database to a VPS, secure it, and connect it to a custom domain with free SSL. Watch the accompanying tutorial on YouTube: https://www.youtube.com/watch?v=2T_Dx7YgBFw

Instructions & commands:

  1. Get your VPS server on Hostinger (Use code CODINGINFLOW for 10% off). Install Ubuntu 24 as the OS and set a root password.
  2. Log into your server as root: ssh root@<your-server-ip>
  3. Update Linux packages: apt update && apt upgrade -y
  4. Create a new user: adduser
@ohid
ohid / scrape.php
Last active June 14, 2024 22:16
Scrap a specific site and get sales data
<?php
$pages = [
'https://templatish.com/template/top-10-elementor-image-hover-effects/?layout=profile',
'https://templatish.com/template/elementor-advanced-slider-with-card-carousel/?layout=profile',
'https://templatish.com/template/elementor-animated-side-menu/?layout=profile',
'https://templatish.com/template/elementor-playing-cards-animated-lightbox/?layout=profile',
'https://templatish.com/template/elementor-team-member-slider-with-reveal-animation/?layout=profile',
'https://templatish.com/template/elementor-table-image-hover-effect/?layout=profile',
'https://templatish.com/template/elementor-stagger-menu/?layout=profile',
<?php
/**
* Plugin Name: [Defender Pro] - Fix Current User IP
* Plugin URI: https://premium.wpmudev.org/
* Description: This plugin is specially integrated with the Defender Pro plugin that sets the current user IP
* Task: SLS-1326
* Version: 1.0.0
* Author: Ohid @ WPMUDEV
* Author URI: https://premium.wpmudev.org/
* License: GPLv2 or later
<?php
/**
* Plugin Name: [Defender Pro] - Fix Current User IP
* Plugin URI: https://premium.wpmudev.org/
* Description: This plugin is specially integrated with the Defender Pro plugin that sets the current user IP
* Task: SLS-1326
* Version: 1.0.0
* Author: Ohid @ WPMUDEV
* Author URI: https://premium.wpmudev.org/
* License: GPLv2 or later
@ohid
ohid / reset-user-login-cookie.php
Last active December 21, 2020 05:00
It will override the new login cookie set hook that set by the WooCommerce Payments or any other plugin during login request
@ohid
ohid / wd-fix-current-user-ip.php
Last active December 31, 2020 15:45
Use this code snippet to set the current user IP correctly.
<?php
/**
* Plugin Name: [Defender Pro] - Fix Current User IP
* Plugin URI: https://premium.wpmudev.org/
* Description: This plugin is specially integrated with the Defender Pro plugin that sets the current user IP
* Task: SLS-1326
* Version: 1.0.0
* Author: Ohid @ WPMUDEV
* Author URI: https://premium.wpmudev.org/
* License: GPLv2 or later
@ohid
ohid / custom-redirect-based-on-form-selection.php
Last active January 25, 2021 07:45
[Forminator] - Custom Form Redirect Based On Submitted Form Data
<?php
/**
* Plugin Name: [Forminator] - Custom Form Redirect Based On Submitted Form Data
* Plugin URI: https://premium.wpmudev.org/
* Description: Adds custom redirect to Forms based on submitted data
* Task: SLS-1147
* Version: 1.0.0
* Author: Panos Lyrakis & Ohid @ WPMUDEV
* Author URI: https://premium.wpmudev.org/
* License: GPLv2 or later
<?php
/**
* Plugin Name: [Defender Pro] - Fix masked login URL page style on BuddyBoss theme
* Author: Ohid @ WPMUDEV
* Author URI: https://premium.wpmudev.org
* License: GPLv2 or later
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
@ohid
ohid / redirect-desktop-users-except-for-specific-users.php
Last active September 20, 2020 10:36
The code will redirect visitors from desktop devices but not for a specific user. Change the $my_ip to your own IP.
<?php
// Redirect mobile visitors to your desktop site
function wimtec_mobile_redirect() {
// My IP
$my_ip = '90.22.192.117';
// Get the client IP
$client_ip = $_SERVER['REMOTE_ADDR']?:($_SERVER['HTTP_X_FORWARDED_FOR']?:$_SERVER['HTTP_CLIENT_IP']);
<?php
/**
* Script Name: [Forminator Pro] Make fields read only
* Script URI: https://premium.wpmudev.org/
* Description: This is a mu-plugin that makes the selected fields not editable/read only.
* Author: Ohidul Islam @ WPMU DEV
* Version: 0.1
* Author URI: https://premium.wpmudev.org/
*
*/