This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Responsive Grid</title> | |
<style> | |
* { margin: 0; padding: 0; box-sizing: border-box; } | |
body { | |
font-family: 'Segoe UI', sans-serif; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){ | |
// Extract videoId and videoType from the current page's script tags | |
var videoId = window.videoId || (document.querySelector("script")?.textContent.match(/var videoId = '(\d+)'/) || [])[1]; | |
var videoType = window.videoType || (document.querySelector("script")?.textContent.match(/var videoType = '(\w+)'/) || [])[1]; | |
// Get the current site domain | |
var siteDomain = window.location.origin; | |
// If both videoId and videoType are found, open the URL in a new tab | |
if (videoId && videoType) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! Dec 10, 2024 https://www.google.com | |
www.google.com##.c93Gbe.o3j99 | |
www.google.com##.lJ9FBc.FPdoLc | |
www.google.com##.qarstb.o3j99 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.sofascore.com/api/v1/league/leaderboard/<leaderboard_id>/rankings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import request, url_for, redirect | |
from urllib.parse import urlencode, urlparse, urlunparse, parse_qsl | |
def get_referer_or_default(default='main.index'): | |
"""Returns the Referer URL if available, otherwise the default URL.""" | |
return request.headers.get("Referer") or url_for(default) | |
def redirect_to_referer_or_default(default='main.index'): | |
"""Redirects to the Referer URL if available, otherwise to the default URL.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"people": [ | |
{ | |
"name": "Alev Alatlı", | |
"birth_year": 1944, | |
"birth_place": "İzmir", | |
"death_year": 2024, | |
"death_place": "İstanbul", | |
"books_written": 46, | |
"books_translated": 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def calculate_percentage(progress: int, total: int) -> int: | |
"""Calculate the percentage progress based on the total value.""" | |
if not isinstance(progress, int) or not isinstance(total, int): | |
raise TypeError("Both 'progress' and 'total' must be integers.") | |
if total <= 0: | |
raise ValueError("Total must be greater than zero.") | |
if progress < 0: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
SETLOCAL | |
FOR /F "usebackq" %%d IN (`PowerShell -NoProfile -Command "Write-Host([Environment]::GetFolderPath('Desktop'))"`) DO ( | |
SET "DESKTOP_FOLDER_PATH=%%d" | |
) | |
@ECHO Desktop Path: %DESKTOP_FOLDER_PATH% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Responsive Font Size Example</title> | |
<style> | |
:root { | |
font-size: calc(1rem + 0.25vw); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.querySelector('input[type=password]').addEventListener('keyup', function (keyboardEvent) { | |
const capsLockOn = keyboardEvent.getModifierState('CapsLock'); | |
if (capsLockOn) { | |
console.log('Caps Lock is ON'); | |
} else { | |
console.log('Caps Lock is OFF'); | |
} | |
}); |
NewerOlder