Skip to content

Instantly share code, notes, and snippets.

View basola21's full-sized avatar
:shipit:
Under refactoring….

Basel Mahmoud basola21

:shipit:
Under refactoring….
View GitHub Profile
@basola21
basola21 / regex.txt
Created May 9, 2023 08:21
Regex for the static files in djnago template
Find what:
(href|src)="([a-zA-Z0-9/.-]+[^.html])"
Replace with:
$1=\"{% static 'assets/$2' %}"
@basola21
basola21 / takeThePower.js
Created September 14, 2023 15:19
Taking the paste power back
function dontTreadOnMe(e) {
e.stopImmediatePropagation()
}
documnet.addEventListener(
"paste",
dontTreadOnMe,
true
):
def qsort(inlist):
if inlist == []:
return []
else:
pivot = inlist[0]
lesser = qsort([x for x in inlist[1:] if x < pivot])
greater = qsort([x for x in inlist[1:] if x >= pivot])
return lesser + [pivot] + greater