This file contains hidden or 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
| # Set the source directory | |
| $SourceDir = "C:\path\to\your\files" | |
| # Set the destination root directory | |
| $DestRoot = "C:\path\to\organized" | |
| # Process all files in the source directory | |
| Get-ChildItem -Path $SourceDir -File | ForEach-Object { | |
| $file = $_ |
This file contains hidden or 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
| Get-ChildItem -Path "C:\Path\" -Filter *.exe -Recurse | | |
| Select-Object Name, FullName | | |
| ForEach-Object { | |
| New-NetFirewallRule -DisplayName "Block $($_.Name) Inbound" -Direction Inbound -Program "$($_.FullName)" -Action Block | |
| New-NetFirewallRule -DisplayName "Block $($_.Name) Outbound" -Direction Outbound -Program "$($_.FullName)" -Action Block | |
| } |
This file contains hidden or 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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text.Json.Serialization; | |
| using MediaBrowser.Controller.Entities; // For BaseItem | |
| using MediaBrowser.Controller.Providers; // For MetadataProvider | |
| namespace IntroSkipper.Api.Models | |
| { | |
| public class SeasonExportData |
This file contains hidden or 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 alpine:latest AS ublock | |
| # Install required tools: curl, jq, and unzip | |
| RUN apk --no-cache add curl jq unzip | |
| # Set environment variables | |
| ENV REPO_API "https://api.github.com/repos/uBlockOrigin/uBOL-home/releases/latest" | |
| ENV FILE_PATTERN "chromium.zip" | |
| # Create a working directory |
This file contains hidden or 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
| (.+)(\r\n) | |
| "\1", |
This file contains hidden or 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
| func (app *application) checkExpirationDate() { | |
| // Read the certificate file | |
| certPEM, err := os.ReadFile(app.ssl.crt) | |
| if err != nil { | |
| app.logger.Fatal("failed to read certificate file", zap.Error(err)) | |
| } | |
| // Decode the PEM encoded certificate | |
| block, _ := pem.Decode(certPEM) | |
| if block == nil || block.Type != "CERTIFICATE" { |
This file contains hidden or 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
| // go build rename_files.go | |
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "path/filepath" | |
| "strings" | |
| ) |
This file contains hidden or 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
| package main | |
| import ( | |
| "context" | |
| // add the backend that you need | |
| _ "github.com/rclone/rclone/backend/local" | |
| "github.com/rclone/rclone/cmd" | |
| "github.com/rclone/rclone/fs" | |
| "github.com/rclone/rclone/fs/sync" |
This file contains hidden or 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
| import { Client, GatewayIntentBits } from 'discord.js'; | |
| const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages] }); | |
| client.on('ready', async () => { | |
| // Replace 'YOUR_GUILD_ID' with your actual guild ID | |
| const guildId = 'YOUR_GUILD_ID'; | |
| // Replace 'YOUR_ROLE_ID' with your actual role ID |
This file contains hidden or 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
| using System; | |
| using System.IO; | |
| using System.Security.Cryptography; | |
| using System.Text; | |
| namespace ConsoleApp | |
| { | |
| internal class Program | |
| { | |
| static void Main(string[] args) |
NewerOlder