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 / 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
});
->Setting processData to false lets you prevent jQuery from automatically transforming the data into a query string.
And Setting the contentType to false is imperative.
Refference link: https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects
//01// File Upload using FormData Object in Javascript
Syntax:
var formData = new FormData(); // Currently empty
formData.append(name, value); // custom text field where key/value pair
formData.append(name, value, filename); // Custom file uploading
Clear CRL & OCSP Cache
Windows
By default, Windows caches Certificate Revocation Lists (CRL) and CA certificates to quickly verify certificate chains. The downside of this behavior is that the client does not pick up a newer CRL until the locally cached CRL has expired. To delete OCSP and/or CRL cache from your Windows system:
Go to Start Menu > Run
Type cmd and press Enter
Enter the following command and press Enter to execute:
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}']`);
//Constraints = a limitation or restriction, discipline
//What is SQL ALTER TABLE statement
-> The ALTER TABLE statement is used to add, delete, or modify columns in an existing table.
-> The ALTER TABLE statement is also used to add and drop various constraints on an existing table.It is also used to rename a table.
--Tables
CREATE TABLE states (