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
#!/bin/bash | |
# Check if MySQL is already installed | |
if ! command -v mysql &> /dev/null; then | |
echo "MySQL is not installed. Installing MySQL Server..." | |
apt update | |
apt install -y mysql-server | |
else | |
echo "MySQL is already installed." | |
fi |
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
#!/bin/bash | |
# Prompt the user for swap size and swappiness | |
read -p "Enter the swap size (e.g., 4G, 2G): " swap_size | |
read -p "Enter the swappiness value (0-100): " swappiness | |
# Create the swap file with the specified size | |
fallocate -l "$swap_size" /swapfile | |
# Set permissions on the swap file |
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
$trigger=New-JobTrigger -Weekly -At "7:00AM" -DaysOfWeek "Monday" | |
$action="PowerShell.exe -ExecutionPolicy ByPass -File D:\Logs\export-logs.ps1" | |
$sb=[Scriptblock]::Create($action) | |
Register-ScheduledJob -Name "Export Logs" -ScriptBlock $sb -Trigger $trigger |
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
#!/usr/bin/python3 | |
import argparse | |
from amp_tools import TransformHtmlToAmp | |
import codecs | |
arg_parser = argparse.ArgumentParser( description = "Copy source_file as target_file." ) | |
arg_parser.add_argument( "source_file" ) | |
arg_parser.add_argument( "target_file" ) | |
arguments = arg_parser.parse_args() |
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 bs4 import BeautifulSoup | |
import requests, csv | |
import lxml | |
from requests.structures import CaseInsensitiveDict | |
ads = [] | |
key = input("Enter a keyword/domain/brand: ") | |
headers = CaseInsensitiveDict() | |
headers["authority"] = "www.google.com" |
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
forfiles /s /m *.gif /c "cmd /c mkdir @FNAME && ffmpeg -i "@FILE" @FNAME/output_%%04d.jpg" |
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
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies" /f | |
reg delete "HKCU\Software\Microsoft\WindowsSelfHost" /f | |
reg delete "HKCU\Software\Policies" /f | |
reg delete "HKLM\Software\Microsoft\Policies" /f | |
reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies" /f | |
reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsStore\WindowsUpdate" /f | |
reg delete "HKLM\Software\Microsoft\WindowsSelfHost" /f | |
reg delete "HKLM\Software\Policies" /f | |
reg delete "HKLM\Software\WOW6432Node\Microsoft\Policies" /f | |
reg delete "HKLM\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Policies" /f |
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
import requests | |
import csv | |
import concurrent.futures | |
import sys, time | |
import bs4 | |
domain = sys.argv[1] | |
csv_file = sys.argv[2] | |
headers = { |
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 __future__ import print_function | |
import os | |
import subprocess | |
root = "." | |
try: | |
os.mkdir('compressed') | |
except FileExistsError: | |
pass |
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
DEL /F /S /Q /A "%AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\*" | |
REG DELETE HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband /F | |
taskkill /F /IM explorer.exe & start explorer |
NewerOlder