Skip to content

Instantly share code, notes, and snippets.

View RayyanNafees's full-sized avatar
🤘
Innovative than ever

Rayyan Nafees RayyanNafees

🤘
Innovative than ever
View GitHub Profile
@RayyanNafees
RayyanNafees / Dockerfile
Last active June 1, 2023 04:00
SurrealDB Docker File for hosting
FROM surrealdb/surrealdb:latest
EXPOSE 8080
CMD ["start", "--bind", "0.0.0.0:8080", "file://data/srdb.db", "--user", "root", "--pass", "root"]
@RayyanNafees
RayyanNafees / slider.html
Created May 20, 2023 01:05
Range Sliders
<input type="range" min="0" max="100" step="1" value="20">
<input type="range" min="0" max="100" step="1" style="--c: lightblue;--l: 6px;--g:12px;">
<input type="range" min="0" max="100" step="1" value="70" style="--c: red;--l: 4px;">
<style>
input {
--c: orange; /* active color */
--g: 8px; /* the gap */
@RayyanNafees
RayyanNafees / backlog.py
Created December 15, 2022 01:23
Tells how many hours of backlogs do i have
import os, json
backlog = dict(
chem=dict(goc=30, nomenclature=8, periodic=12, kinetics=18, etc=3, ionicEq = 12), # etc = redox | chemEq | surface
phys=dict(shm=10, ktg=10, wave=10, fluids=6),
math=dict(hyperbola=11, sets=4, funcs=12, trigno=15),
)
hours = sum(sum(lecs.values()) for sub, lecs in backlog.items())
/* <div class="loader" /> */
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
def f(n): return n*f(n-1) if n >1 else 1
nCr = lambda n,r: f(n)/(f(n)*f(n-r))
nPr = lambda n,r: f(n)/f(n-r)
<meta charset="utf-8"/>
<meta http-equiv="x-ua-compatible" content="ie=edge"/>
<meta
name="viewport"
content="width=device-width, height=device-height, viewport-fit=cover, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"
/>
<meta name="mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<!DOCTYPE HTML>
<html>
<head>
<title></title>
</head>
<body>
<button>
Google
</button>
<button>
@RayyanNafees
RayyanNafees / pyqt_example.py
Created May 10, 2022 19:38
A fiddle example for PyQt4
#!/bin/env python
# coding: utf-8
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import sys
class MainWindow(QMainWindow):
def __init__(self, parent=None):
super(MainWindow, self).__init__(parent)
@RayyanNafees
RayyanNafees / suite.html
Created May 2, 2022 07:08
A firebase hosted index.json for redirecting to the ugly suite url
<html>
<head>
<title> CodeCube Suite </title>
<meta name="description" content="A project management suite for codecube" />
<script>
location.href='http://crm.mycsnl.com/';
</script>
</head>
TuneGenerator();
function TuneGenerator() {
const notesGenerator = new NotesGenerator();
setInterval(function () {
notesGenerator.playNote(3);
}, 800);
setInterval(function () {