Skip to content

Instantly share code, notes, and snippets.

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

Amadi Michael C Mgregchi

🏠
Working from home
View GitHub Profile
@Mgregchi
Mgregchi / screenshot.py
Last active March 24, 2022 20:42
Simple GUI anywhere screenshot taker
# Python 3
#FOR TAKING USER PREDEFINED SCREENSHOTS
# SCREENSHOT
from PIL import ImageGrab
# GUI
import PySimpleGUI as sg
# FOLDER AND DIRECTORY
import os
# GENERIC NAMING
@Mgregchi
Mgregchi / bs5-popover.html
Created October 2, 2021 10:27
Html contents inside a bootstrap 5 popover
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
$(function() {
var options = {
html: true,
title: "Optional: HELLO(Will overide the default-the inline title)",
//html element
@Mgregchi
Mgregchi / bs5-popover-v1-snippet.html
Last active October 11, 2021 09:16
Custom Bootstrap popover snippet
<div hidden >
<div data-name="popover-content">
<div class="input-group">
<input type="text" class="form-control form-control-sm" placeholder="Search" name="search">
<div class="input-group-btn">
<button class="btn btn-danger" type="submit">
<i class="bi bi-search fa fa-search"></i>
</button>
</div>
@Mgregchi
Mgregchi / load-content-method-1.js
Last active October 27, 2021 15:08
Access and use html elements from a page loaded with JQuery
$(document).ready(function(){
$("#loader").click(function(){
$("#container").load("/jquery-load-shopping-basket/",
function(e){
//Mix
$("empty-basket-search")
.prevObject[0]
.getElementById("empty-basket-search")
@Mgregchi
Mgregchi / load-content-method-2.js
Last active October 27, 2021 15:08
Access and use html elements from page loaded with JQuery .load()
$(document).ready(function(){
$("#loader").click(function(){
$("#container").load("/jquery-load-shopping-basket/",
function(e){
$(this).find("#empty-basket-search")
.keypress(function(e){
$("#single-label").text("You've clicked: ".concat(e.keyCode))
@Mgregchi
Mgregchi / JQuery-load-and-use-content.html
Created October 27, 2021 15:03
Access and use html elements from a page loaded with JQuery
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name='viewport' content='width=device-width, initial-scale=1'>
<meta name="author" content="Mgregchi, Michael Amadi, @Mgregchi">
<meta name="email" content="[email protected]">
<title>How to work with JQuery load() contents</title>
<link href='https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css' rel='stylesheet' onerror="">
<script type='text/javascript' src='https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js'></script>
@Mgregchi
Mgregchi / guide.md
Last active February 18, 2024 01:25
Installing python pillow for Namecheap shared hosting project (Django / Flask)

Initial Step: Select and zip compress pillow related files locally.

Zip compress pillow files installed locally

Step1: Upload Zipped pillow files to Namecheap shared hosting file manager.

@Mgregchi
Mgregchi / how_to_install_mysql_5.7_ubuntu.md
Created April 28, 2023 11:04
How to install MySQL 5.7* on ubuntu

Introduction:

Have you ever wondered what happens behind the scenes when you type "https://www.google.com" in your browser and hit Enter? It's like opening a magical door that leads you to the vast realm of the internet. Let's embark on an exciting journey filled with technical wonders and demystify the fascinating process step by step!

DNS Request - Unlocking the Address:

The first stop on our journey is the Domain Name System (DNS). When you enter "https://www.google.com," your browser sends a DNS request to find the corresponding IP address for the domain name. Think of it as asking a friendly wizard to translate the website's name into its secret location coordinates.

TCP/IP - Building the Pathway:

@Mgregchi
Mgregchi / ckeditor_uploader_value_error.md
Created June 19, 2023 15:01
Ckeditor_uploader ValueError: source code string cannot contain null bytes

I struggled a whole day trying to solve the error below with no success.

Exception in thread django-main-thread:
Traceback (most recent call last):
  File "C:\Users\USER-PC\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "C:\Users\USER-PC\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\USER-PC\Documents\ALX\vpnprobe\Lib\site-packages\django\utils\autoreload.py", line 64, in wrapper