Skip to content

Instantly share code, notes, and snippets.

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

Bablu Ahmed bablukpik

🏠
Working from home
View GitHub Profile
@bablukpik
bablukpik / next-self-hosting-instructions.md
Created September 26, 2025 00:46 — forked from codinginflow/next-self-hosting-instructions.md
Deploy & secure a Next.js app + Postgres DB on a VPS

Self-Hosting Next.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
@bablukpik
bablukpik / uninstall_python3.MD
Created January 30, 2024 18:28 — forked from zhensongren/uninstall_python3.MD
How to uninstall python3 from Ubuntu

To list all python versions in default locations

ls /usr/bin/python*

To remove just python3 package

sudo apt-get remove python3.5

plus it's dependent packages

sudo apt-get remove --auto-remove python3.5

plus configuration and/or data files of python3

sudo apt-get purge python3.5

@bablukpik
bablukpik / uninstall_python3.MD
Created January 30, 2024 18:28 — forked from zhensongren/uninstall_python3.MD
How to uninstall python3 from Ubuntu

To list all python versions in default locations

ls /usr/bin/python*

To remove just python3 package

sudo apt-get remove python3.5

plus it's dependent packages

sudo apt-get remove --auto-remove python3.5

plus configuration and/or data files of python3

sudo apt-get purge python3.5

@bablukpik
bablukpik / app1.js
Created March 23, 2022 07:55 — forked from prof3ssorSt3v3/app1.js
Express JS Routing examples for YouTube video series on Express
//Starter version of the main app.js file
"use strict";
const express = require("express");
const app = express();
const port = process.env.port || 4444;
app.get("/", (req, res) => {
//handle root
});
input {
jdbc {
clean_run => true
jdbc_driver_library => "/root/jdbc.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://localhost:3306/jobschema"
jdbc_user => "root"
jdbc_pass => ""
schedule => "* * * * *"
statement => "select jobid, jobname, executiontime, jobstatus from jobdata where jobid > :sql_last_value"
@bablukpik
bablukpik / app.js
Created October 16, 2020 19:50 — forked from rissem/app.js
html5/node.js video capture and upload
/* global require */
const multipart = require('connect-multiparty')
const multipartMiddleware = multipart()
const path = require('path')
const os = require('os')
const fs = require('fs')
var express = require('express')
var app = express()
************Source Code**************
// src/actions/incrementAction.js
const incrementAction = {
type: 'increment',
payload: 1
}
export default incrementAction;
// To find closest id using jquery
var id = $("button").closest("div").prop("id");
// To find closest id using javascript
<li id='myLi' onclick="alert(this.parentNode.id)">A</li>
// Menu Text Related
await this.waitFor(`//a[contains(@class, 'selected') and contains(text(), '${tabName}')]`);
await this.waitFor(`//a[contains(@class, 'selected') and text()='${tabName}']`);
@bablukpik
bablukpik / index.php
Created March 12, 2019 05:00 — forked from ajitbohra/index.php
mpdf: HTML/CSS to PDF & send pdf via email
<?php
/*
mPDF: Generate PDF from HTML/CSS (Complete Code)
*/
require_once( 'mpdf/mpdf.php'); // Include mdpf
$stylesheet = file_get_contents('assets/css/pdf.css'); // Get css content
$html = '<div id="pdf-content">
Your PDF Content goes here (Text/HTML)
</div>';
//Codeigniter vs Ckeditor vs Ckfinder
Link: https://www.youtube.com/watch?v=6sK7DBxILko