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 re | |
import sys | |
import os | |
import glob | |
def srt_vtt_to_text(file_path): | |
txt_file = os.path.splitext(file_path)[0] + '.txt' | |
try: | |
with open(file_path, 'r', encoding='utf-8') as 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
package main | |
import ( | |
"flag" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"net/http" | |
"sync" | |
"time" |
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
id_rsa:$sshng$6$16$51abbdb90f62c1b60d256c1bcd40a857$1894$6f70656e7373682d6b65792d7631000000000a6165733235362d63747200000006626372797074000000180000001051abbdb90f62c1b60d256c1bcd40a857000000100000000100000197000000077373682d727361000000030100010000018100d2f191a9d9180efb2cc5c2b776e47faf4b39223940518c02f1bb33060898c4ff3fe67f7c1d696b44d0cb1ac936b9e2a8a067393a4d1abc6d7844c11ecfbf9c053d91541f40971586c394b360c0e038d0f3bc458af0c86a87f0015bc60f883feb339939e5eabbbc77c12a8f7d79f090b436ecea9d0ec0f15631daf66a66ffdd60e480729bf579afe1a15a762bc086a9659b8cfced152cafc7716089918fd8e7d7265a740a8f5748bb726b93d11b928a0d12815094213ca5c04817cf276a79fe5706a8f7b35dc00dfd639f0d18960c3424852d3defc7625e47b4e963d3d31dfcc6bcbd796d1970887e170888d9c82d0c58ad36a6a1bb422347a795c1df921fba93aeed39fccb959da6ed368f0ecd75e9afca21e863f3d6e27507549c98c6c077484e8c129c07429e427f65dbf0d906803da922ebed409d9847e243d361202560dc24b440f309e233a1d4c458923c6cbfe3d7d6b88e1b9b0b7cdf8c81efe460a5dc09eff75d9a9ac26f9c7b69b00ec49959b98109839902069bb8b8d6037f4e66f7000 |
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 json | |
import subprocess | |
import datetime | |
import time | |
MAX_SPD=80 | |
MIN_SPD=22 | |
ipmi_host="192.168.2.145" | |
ipmi_pass="xxxxxx" |
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/env bash | |
# Step 1: Fill in EMAIL, TOKEN, DOMAIN and SUBDOMAIN. Your API token is here: https://www.cloudflare.com/a/account/my-account | |
# Make sure the token is the Global token, or has these permissions: #zone:read, #dns_record:read, #dns_records:edit | |
# Step 2: Create an A record on Cloudflare with the subdomain you chose | |
# Step 3: Run "./ddns.sh -l" to get the zone_id and rec_id of the record you created. | |
# Fill in ZONE_ID and REC_ID below | |
# This step is optional, but will save you 2 requests every time you this script | |
# Step 4: Run "./ddns.sh". It should tell you that record was updated or that it didn't need updating. | |
# Step 5: Run it every hour with cron. Use the '-s' flag to silence normal output |
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
ip -6 addr | grep inet6 | grep global | grep -v "temp" | grep -v "mngtmpaddr" | grep -v "fd" | awk -F '[ \t]+|/' '{print $3}' | |
#set my addr example: | |
#ip -6 addr add 2001:19f0::00e3 dev eth0 |
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 minimalmodbus | |
import time | |
import serial | |
import datetime | |
import redis | |
import pickle | |
rconn = redis.Redis('localhost') |
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 subprocess | |
import json | |
cmd = "sensors -j" | |
x=subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT) | |
temps=json.loads(x) | |
temp0=(temps['coretemp-isa-0000']['Package id 0']['temp1_input']) | |
print(temp0) |
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 | |
#apt-get install linux-cpupower | |
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor | |
echo "Setting to Powersave" | |
cpupower frequency-set --governor powersave | |
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor |
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/sh | |
### BEGIN INIT INFO | |
# Provides: frps | |
# Required-Start: $local_fs $network | |
# Required-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: frps service deamon | |
# Description: frps service daemon |
NewerOlder