Skip to content

Instantly share code, notes, and snippets.

View davidofug's full-sized avatar
💭
Collaborating

David Wampamba davidofug

💭
Collaborating
View GitHub Profile
@davidofug
davidofug / elementor-pagination-styles.css
Last active March 17, 2024 20:43
To style Elementor Pagination on archive pages
/*
* USAGE
* Add the code in the Advanced section of the Archive Posts Widget
* Change the text color in the Style Tab of the Archive Posts Widget
* Author: @davidofug
*/
/* Normal state */
selector .page-numbers {
border: 2px dashed #000;
@davidofug
davidofug / select-styling.html
Created December 22, 2023 17:14
Start here to style your select boxes.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
/* Hide the default arrow */
select {
-webkit-appearance: none;
-moz-appearance: none;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Master PHP Arrays</title>
</head>
<body>
<h1>Master PHP Arrays </h1>
@davidofug
davidofug / reverse-sort.php
Last active January 21, 2023 15:18
Reverse sorting in PHP
<?php
//php code here
?>
@davidofug
davidofug / Connecting Your Django App to a Custom Domain Name
Created January 19, 2023 11:18
Code Step-by-Step Guide on Connecting Your Django App to a Custom Domain Name.
# 1. Navigate to the Nginx server directive directory.
cd /etc/nginx/conf.d/
or
/etc/nginx/sites-available/
# 2. Create a the Server block configuration file.
sudo nano domain.com.conf
# 3. Add configuration code to the configuration file and save.
@davidofug
davidofug / for-loops.php
Last active January 17, 2023 19:27
Master PHP loops for beginners. Part 1 and 2
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PHP Mentorship - Master loops - Part 2</title>
</head>
<body>
<h1>Master Loops</h1>
@davidofug
davidofug / DQL-SELECT.sql
Created July 6, 2022 07:25
Data Query Language Commands
-- How to use sort data
-- ORDER BY keyword
SELECT * FROM Districts ORDER BY id;
SELECT * FROM Districts ORDER BY id DESC;
SELECT * FROM Districts ORDER BY name;
SELECT * FROM Districts ORDER BY name DESC;
@davidofug
davidofug / DDL-ALTER.sql
Last active July 6, 2022 07:48
Data Definition Language Commands in SQL
-- ALTER: Modifies the Table
-- Syntax: ALTER TABLE TABLE_NAME
ALTER TABLE Districts
ADD dCode SMALLINT
-- DROP Column;
-- Drops the hint column of the demo table
@davidofug
davidofug / DML-commands-Insert.sql
Last active July 5, 2022 15:58
SQL Data Manipulation Commands
-- DML - Data Manipulation Language Commands
-- INSERT, UPDATE, DELETE
-- Syntax INSERT INTO table_name (column1, column2, column3, columnN...) VALUES (..., ..., ... );
-- INSERT into demo (id, name, hint) VALUES (7, 'Coach Wampamba David', 'Apps Developer Coach' );
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Embeddable Form</title>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css"