Skip to content

Instantly share code, notes, and snippets.

View foxtbirdy's full-sized avatar
🏠
#^)

Ahnaf T. Jaheen foxtbirdy

🏠
#^)
View GitHub Profile
@foxtbirdy
foxtbirdy / index.html
Last active July 27, 2022 08:26
Creating a JS script that can restructure values of restcountries.com API effectively
<!DOCTYLE html>
<html>
<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>Demo for extracting info from restcountries v3.1</title>
<script defer src="script.js"></script>
</head>
<body style="background-color:grey"> <!-- changed the background because some nations have their flags in white -->
@foxtbirdy
foxtbirdy / app.py
Last active January 2, 2023 03:20
Changing themes from the menu bar in PyQt5 GUI
# -*- coding: utf-8 -*-
# @Author: Climax
# @Date: 2022-08-08 10:30:23
# @Last Modified by: Climax
# @Last Modified time: 2022-08-08 14:20:54
import sys
from PyQt5.QtWidgets import (QMainWindow, QApplication, QToolBar, QAction)
@foxtbirdy
foxtbirdy / timeConverter1.js
Created January 2, 2023 03:20
Converting minutes to hours, minutes using JavaScript
function timeConverter1(totalMinutes) {
const hours = Math.trunc(totalMinutes / 60);
const minutes = totalMinutes % 60;
return { hours, minutes };
}
// {hours: 3, minutes: 20}
console.log(timeConverter1(200));