Skip to content

Instantly share code, notes, and snippets.

View Chuttyboy's full-sized avatar
❤️
الحمدلله

Harry Chuttyboy

❤️
الحمدلله
View GitHub Profile
@Chuttyboy
Chuttyboy / XAMPP_setup
Last active March 18, 2022 09:57
XAMPP & Wordpress setup
START XAMPP IN TERMINAL
step 1 : cd /opt/lampp
step 2 : sudo /opt/lampp/lampp start
---------------------------------------------------------------------------------------------------
Start XAMPP
permission to all users = sudo chmod -R 777 lampp/
phpmyadmin error = sudo chmod 755 /opt/lampp/phpmyadmin/config.inc.php
@Chuttyboy
Chuttyboy / Query Data from External AP
Last active December 8, 2021 08:13
Data _from_api
Query Data from External API: WordPress API integration using wp_remote_get() :
code :
<?php
/**
* Plugin name: Query APIs
* Plugin URI: https://omukiguy.com
* Description: Get information from external APIs in WordPress
* Author: Laurence Bahiirwa
<!DOCTYPE html>
<html lang="en">
<head>
<title>Fetch API</title>
<script type="text/javascript" src="https://cdn.jsdelivr.net/jquery/latest/jquery.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" />
if apache server stopped in XAMP
step 1 : sudo service apache2 status
step 2 : sudo service apache2 stop
with open("output.txt", "a") as f:
print("result will be save in output.txt", file=f)
import datetime
print(datetime.datetime.now().strftime("%a, %d %B %Y %H:%M:%S")
a - Day
d - date
b - month
output :
import cv2
import os
# Opens the inbuilt camera of laptop to capture video.
cap = cv2.VideoCapture(0)
i = 0
while(cap.isOpened()):
ret, frame = cap.read()
# This condition prevents from infinite looping
@Chuttyboy
Chuttyboy / apache & Mysql
Created March 19, 2022 09:43
Start stop and restart commands for Apache and Mysql
To start Apache
systemctl start apache2.service
To stop Apache
systemctl stop apache2.service
To Restart Apache
systemctl restart apache2.service
----------------------------------------------------------------------------------
"""
python3 detect.py --weights yolov5s.pt --source 0
"""
import argparse
import os
import sys
from pathlib import Path
from turtle import pd
import datetime