Skip to content

Instantly share code, notes, and snippets.

View krisk248's full-sized avatar
๐Ÿ‘‰

Kannan krisk248

๐Ÿ‘‰
  • Internet
View GitHub Profile
#Requires -Version 5.0
<#
.SYNOPSIS
Universal Dynamic Backup Script with Auto-Update
.DESCRIPTION
PowerShell backup script with GitHub Gist auto-update capability
Created by Kannan from TTS - Clean & Efficient Version
.VERSION
2.1
#>
@krisk248
krisk248 / rclone_bash.sh
Created February 10, 2025 05:25
this to add in bashproifle
function rclonecopy() {
local source="$1"
local destination="$2"
# Generate timestamp for log file
local timestamp=$(date +"%Y-%m-%d_%H-%M-%S")
local logfile="naarnclone-${timestamp}-log.txt"
# Define your ntfy topic
local ntfy_topic="mytopic"
# this is to take a backup every night to have a copy to that drive.
(For Google workspace.)
rclone copy ashwanthdrive: "backupdrive:/Ashwanth backup" --drive-server-side-across-configs --dry-run -v --progress --log-file="C:\rclone\backup_log.txt" --log-level INFO
@krisk248
krisk248 / copyalltaskid.js
Last active February 8, 2025 13:48
Step-by-Step: Open the site with "Selected Source" filter. Open browser Dev Tools (F12) and go to Console. Paste and run the script. Confirm by typing "yes" in the prompt. Task pages open in new tabs. How it Works: The script collects task IDs, asks for confirmation, and opens each task in a new tab.
(function () {
const ids = [];
// Select all elements containing the task IDs
const idElements = document.querySelectorAll('[data-colindex="0"] .MuiBox-root');
// Extract and store IDs in an array
idElements.forEach((el) => {
const idText = el.textContent.trim();
if (idText.match(/^\d+$/)) { // Ensure it's a valid numeric ID
ids.push(idText);
vijay bro
@krisk248
krisk248 / totalhours.ps1
Created January 3, 2025 08:48
IIT M video hours and size cheker script
# Define the path of the folder containing video files
$folderPath = "./color output"
# Get all video files (using common video file extensions)
$videoExtensions = @(".mp4", ".mkv", ".avi", ".mov", ".flv", ".webm", ".wmv")
$videoFiles = Get-ChildItem -Path $folderPath -Recurse -File | Where-Object { $videoExtensions -contains $_.Extension.ToLower() }
# Initialize counters
$totalSize = 0
$totalDuration = 0
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Title Card</title>
<!--Google Fonts-->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Effects of Meat Consumption on Health</title>
<style>
body {
font-family: Arial, sans-serif;
line-height: 1.6;
import subprocess
import os
from datetime import datetime
from pathlib import Path
import calendar
def format_date_for_url(date):
year = date.strftime("%Y")
month = date.strftime("%m")
day = date.strftime("%d")
#!/bin/bash
echo "Checking system-wide browser settings..."
# Check for system-wide proxy settings
networksetup -getwebproxy Wi-Fi
networksetup -getsecurewebproxy Wi-Fi
# Check for system-wide DNS settings
cat /etc/resolv.conf