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 scapy.all import IP, ICMP, sr1 | |
import time | |
from datetime import datetime | |
import statistics | |
from rich.console import Console | |
from rich.table import Table | |
from rich.panel import Panel | |
from rich.progress import Progress, TextColumn, BarColumn, TimeElapsedColumn | |
import threading |
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 bash | |
echo "Applying Torrent blocking rules..." | |
# Block Torrent algo string using Boyer-Moore (bm) | |
BLOCK_STRINGS_BM=( | |
"BitTorrent" | |
"BitTorrent protocol" | |
"peer_id=" | |
".torrent" | |
"announce.php?passkey=" | |
"torrent" |
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 os | |
import requests | |
import logging | |
import time | |
# Replace with your own values | |
MP3_FOLDER_PATH = '' | |
TELEGRAM_TOKEN = '' | |
TELEGRAM_CHANNEL_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
import random | |
import heapq | |
# Define the Cell class | |
class Cell: | |
def __init__(self): | |
self.parent_i = 0 # Parent cell's row index | |
self.parent_j = 0 # Parent cell's column index | |
self.f = float('inf') # Total cost of the cell (g + h) | |
self.g = float('inf') # Cost from start to this cell |
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
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nginx | |
labels: | |
app: nginx | |
spec: | |
replicas: 1 | |
selector: |
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
### IMPROVE SYSTEM MEMORY MANAGEMENT ### | |
# Increase size of file handles and inode cache | |
fs.file-max = 2097152 | |
# Do less swapping | |
vm.swappiness = 10 | |
vm.dirty_ratio = 60 | |
vm.dirty_background_ratio = 2 |
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/share/zabbix/include/classes/api/clients/CLocalApiClient.php.orig 2023-03-08 16:23:26.555055621 +0100 | |
+++ /usr/share/zabbix/include/classes/api/clients/CLocalApiClient.php 2023-03-08 16:22:46.378217849 +0100 | |
@@ -128,6 +128,13 @@ | |
$newTransaction = true; | |
} | |
+ // UGLY GRAFANA DATASOURCE HACK | |
+ // rename "user" param to "username" when present | |
+ if ($params['user'] ?? null) { | |
+ $params['username'] = $params['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
#!/bin/bash | |
read -p 'Enter Email : ' email | |
read -p 'Enter Domain : ' domain | |
function install_socat() { | |
apt install socat -y | |
} | |
function install_acme() { | |
curl https://get.acme.sh | sh |
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 best_ips = 'http://bot.sudoer.net/best.cf.iran.all' | |
let operator_to_ips = {}; | |
const https_ports = [443, 2053, 2083, 2087, 2096, 8443] | |
const subLink = 'https://raw.githubusercontent.com/mahdibland/ShadowsocksAggregator/master/sub/sub_merge.txt'; | |
const alpns = ['h2', 'http/1.1', 'h2,http/1.1', '']; | |
const useragents = ['chrome', 'firefox', 'safari', 'random', 'randomized'] | |
export default { | |
async fetch(request) { | |
let url = new URL(request.url); |
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 -e | |
usage(){ | |
echo "kubectl ssh <pod_name> [-n | --namespace] [-u | --user] [<ssh-parameters>]" | |
} | |
get_node_ip(){ | |
pod_name=$1 | |
namespace=$2 |
NewerOlder