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
@echo off | |
set "SCRIPT_DIR=%~dp0" | |
cd /d "%SCRIPT_DIR%" | |
mkdir "converted" 2>nul | |
echo A converter | |
for %%f in (*.heic *.HEIC) do magick "%%f" -quality 100 "converted/%%~nf.jpg" |
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
function sha256sum { | |
if($args.Count -eq 0) { | |
Write-Host "Usage: .\$($MyInvocation.MyCommand.Name) string to be hashed"; | |
return | |
} | |
$stringAsStream = [System.IO.MemoryStream]::new() | |
$writer = [System.IO.StreamWriter]::new($stringAsStream) | |
$writer.write("$args") | |
$writer.Flush() |
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
ssl_issuer() { | |
echo | openssl s_client -servername .com -connect $1:443 2>/dev/null | openssl x509 -noout -subject | |
} | |
dall() { | |
while IFS= read -r line | |
do | |
echo "$line -> $(dig +short a $line)" | |
done < $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
#!/bin/bash | |
# Assumes ssh key is loaded in environment | |
# === CONFIGURATION === | |
USER="cpaneluser" | |
REMOTE_HOST="source.server.com" | |
REMOTE_SSH_PORT=22 | |
REMOTE_SSH_USER="root" | |
REMOTE_HOME="/home/$USER/" |
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
use std::collections::HashMap; | |
use std::env; | |
use std::time::Instant; | |
fn main() { | |
let value = get_value(); | |
let now = Instant::now(); | |
let answer = fib_loop(value.into()); | |
let elapsed = now.elapsed(); |
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
const std = @import("std"); | |
const time = std.time; | |
const Instant = time.Instant; | |
const Timer = time.Timer; | |
const testing = std.testing; | |
const expect = std.testing.expect; | |
pub fn main() !void { | |
var x: u32 = 100; | |
// Get a page allocator? |
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
#!/usr/bin/env python3 | |
import re | |
from argparse import Namespace, ArgumentParser, Action | |
from typing import Dict, List | |
ADDOP = ["A", "ADD"] | |
REMOP = ["R", "REM", "REMOVE"] | |
class StoreUpper(Action): |
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
#Declare our named parameters here | |
param( | |
[Parameter(mandatory=$true)] | |
[string] $Source, | |
[Parameter(mandatory=$true)] | |
[string] $Destination | |
) | |
if ((Get-ChildItem -Path $Destination -Recurse | Measure-Object -Property Length -Sum).Count -gt 0) { |
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
#!/usr/bin/env python | |
import os | |
# Get input file | |
input_file = input("Enter the path to the input SQL file: ") | |
output_dir = 'split_files' | |
# Create the output directory if it doesn't exist | |
if not os.path.exists(output_dir): |
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
:: Windows 10 Hardening Script | |
:: This is based mostly on my own personal research and testing. My objective is to secure/harden Windows 10 as much as possible while not impacting usability at all. (Think being able to run on this computer's of family members so secure them but not increase the chances of them having to call you to troubleshoot something related to it later on). References for virtually all settings can be found at the bottom. Just before the references section, you will always find several security settings commented out as they could lead to compatibility issues in common consumer setups but they're worth considering. | |
:: Obligatory 'views are my own'. :) | |
:: Thank you @jaredhaight for the Win Firewall config recommendations! | |
:: Thank you @ricardojba for the DLL Safe Order Search reg key! | |
:: Thank you @jessicaknotts for the help on testing Exploit Guard configs and checking privacy settings! | |
:: Best script I've found for Debloating Windows 10: https://github.com/Sycnex/Windows10Debloater | |
: |
NewerOlder