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 requests | |
import urllib.parse | |
import urllib.request | |
import os | |
from bs4 import BeautifulSoup | |
soup_base_url = 'https://gpunktschmitz.soup.io' | |
download_path = '/home/gpunktschmitz/backup/gpunktschmitz.soup.io/' |
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 | |
# source: https://notepad2.blogspot.com/2014/11/a-script-to-turn-off-intel-cpu-turbo.html | |
# | |
# prerequisites: | |
# 1. 'sudo apt-get install msr-tools' | |
# 2. 'sudo modprobe msr' | |
if [[ -z $(which rdmsr) ]]; then |
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
$counter = 1 | |
$files = Get-ChildItem -Path /tmp/path/ | |
foreach($file in $files) { | |
$newFilename = "{0:d4}$($file.Extension)" -f $counter | |
Move-Item -Path $file.FullName -Destination $newFilename | |
$counter++ | |
} |
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 | |
ip=192.168.178.2 | |
url=http://${ip}/Info.live.htm | |
content="$(curl -s "${url}" | grep -oP '(?<=active_wireless::).*?(?=})')" | |
clients=0 | |
counter=0 | |
for i in $(echo $content | tr "," "\n"); do counter=$[counter + 1] |
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
$_PocketUri = 'https://getpocket.com/v3' | |
$_PocketUser = 'yourusername' | |
$_ConsumerKey = '12345-67890ABCDEFGHIJKLMNOPQRS' | |
$_AccesToken = '12345678-90AB-CDEF-GHIJ-KLMNOP' | |
$Headers = @{ | |
"content-type" = 'application/json' | |
} | |
$Params = @{ |
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
<?php | |
define('DS', DIRECTORY_SEPARATOR); | |
define('ROOT', dirname(__FILE__)); | |
$output_file = ROOT . DS . 'output.file'; | |
$base64file = 'base64.txt'; | |
$base64filecontent = file_get_contents($base64file); | |
file_put_contents($output_file, base64_decode($base64filecontent)); |
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 | |
OUTPUTNAME=$1 | |
TMPNAME=${OUTPUTNAME} | |
EXTENSION=.tpl | |
COUNTER=1 | |
OUTPUTDIR=/tmp | |
while [ -f ${OUTPUTDIR}/${OUTPUTNAME}${EXTENSION} ]; do | |
OUTPUTNAME=${TMPNAME}"_"${COUNTER} | |
let COUNTER=${COUNTER}+1 |