Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Amadi Michael C Mgregchi

🏠
Working from home
View GitHub Profile
@Mgregchi
Mgregchi / guide.md
Last active February 6, 2022 20:45
Installing python pillow for Namecheap shared hosting project (Django / Flask)
View guide.md

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 / JQuery-load-and-use-content.html
Created October 27, 2021 15:03
Access and use html elements from a page loaded with JQuery
View JQuery-load-and-use-content.html
<!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="mgregchi@gmail.com">
<title>How to work with JQuery load() contents</title>
<link href='https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css' rel='stylesheet' onerror="">
<script type='text/javascript' src='https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js'></script>
@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()
View load-content-method-2.js
$(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 / load-content-method-1.js
Last active October 27, 2021 15:08
Access and use html elements from a page loaded with JQuery
View load-content-method-1.js
$(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 / bs5-popover-v1-snippet.html
Last active October 11, 2021 09:16
Custom Bootstrap popover snippet
View bs5-popover-v1-snippet.html
<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 / bs5-popover.html
Created October 2, 2021 10:27
Html contents inside a bootstrap 5 popover
View bs5-popover.html
<!-- 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 / screenshot.py
Last active March 24, 2022 20:42
Simple GUI anywhere screenshot taker
View screenshot.py
# Python 3
#FOR TAKING USER PREDEFINED SCREENSHOTS
# SCREENSHOT
from PIL import ImageGrab
# GUI
import PySimpleGUI as sg
# FOLDER AND DIRECTORY
import os
# GENERIC NAMING