Skip to content

Instantly share code, notes, and snippets.

View fastfingertips's full-sized avatar
🧶
knitting..

fastfingertips fastfingertips

🧶
knitting..
  • Istanbul
  • 06:52 (UTC +03:00)
View GitHub Profile
@fastfingertips
fastfingertips / recommendations.md
Last active December 30, 2024 09:47
Recommendations for AV companies

Recommendations for AV Companies

  • Audit your products: source code reviews & fuzzing.

    • No, AV Comparatives and the like are not even remotely close to this.
    • Running a Bug Bounty, like Avast, is a very good idea too.
    • Internal code audits are good. Third-party ones are awesome.
  • Do not use the highest privileges possible for scanning network packets, files, etc...

    • You don't need to be root/system to scan a network packet or a file.
  • You only need root/system to get the contents of that packet or file.

@fastfingertips
fastfingertips / en.json
Created December 21, 2024 12:05
tvtime assets
{
"af": "Afrikaans",
"af_NA": "Afrikaans (Namibia)",
"af_ZA": "Afrikaans (South Africa)",
"ak": "Akan",
"ak_GH": "Akan (Ghana)",
"sq": "Albanian",
"sq_AL": "Albanian (Albania)",
"sq_XK": "Albanian (Kosovo)",
"sq_MK": "Albanian (Macedonia)",
@fastfingertips
fastfingertips / responsive_grid.html
Created December 18, 2024 11:41
Dynamic responsive grid with interactive cards, generated using HTML and CSS.
<!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;
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) {
! Dec 10, 2024 https://www.google.com
www.google.com##.c93Gbe.o3j99
www.google.com##.lJ9FBc.FPdoLc
www.google.com##.qarstb.o3j99
https://www.sofascore.com/api/v1/league/leaderboard/<leaderboard_id>/rankings
@fastfingertips
fastfingertips / flask_url_helpers.py
Created September 7, 2024 11:38
helper functions for flask url redirects
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."""
{
"people": [
{
"name": "Alev Alatlı",
"birth_year": 1944,
"birth_place": "İzmir",
"death_year": 2024,
"death_place": "İstanbul",
"books_written": 46,
"books_translated": 1,
@fastfingertips
fastfingertips / percentage_calculator.py
Last active September 7, 2024 11:45
percentage calculation utility
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:
@fastfingertips
fastfingertips / get_desktop_path.bat
Created March 16, 2024 04:32
This batch script retrieves the path of the desktop folder on a Windows system using PowerShell and then echoes (displays) the path.
@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%