Skip to content

Instantly share code, notes, and snippets.

from selenium import webdriver
from selenium.webdriver.firefox.service import Service
from selenium.webdriver.firefox.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from webdriver_manager.firefox import GeckoDriverManager
import time
import random
#!/bin/bash
# Make sure only root can run our script
if [ "$(id -u)" != "0" ]; then
echo "Diese Script muss als root ausgeführt werden" 1>&2
exit 1
fi
DATUM=`date +%Y%m%d`
before=`date +%Y%m%d -d "yesterday"`
@kevinski303
kevinski303 / replace_i18n_strings_smw.sh
Created May 5, 2020 07:33
replace some strings in smw i18n json files
for f in ./*.json; do
echo "file $f"
cat "$f" | grep smw_decseparator
cat "$f" | grep smw_kiloseparator
sed -i '/smw_decseparator/c\"smw_decseparator": ".",' "$f"
sed -i '/smw_kiloseparator/c\"smw_kiloseparator": "",' "$f"
cat "$f" | grep smw_decseparator
cat "$f" | grep smw_kiloseparator
echo "-----------"
done
@kevinski303
kevinski303 / createfoldermovefile.sh
Created February 24, 2020 13:12
batchprocessing, moving multiple files into a subfolder from its filename (needed this to handle over 200 files)
for f in *.pdf;
do
echo "filename: $f";
folder="$(echo $f | cut -f1 -d '.')";
echo "creating folder $folder";
mkdir $folder;
echo "moving file $f to folder $folder"
mv $f $folder;
done
#!/bin/bash -e
echo extracting the mcrypt archive
if ls | grep mcrypt-1.0.2.tgz &> /dev/null; then
tar -zxvf ./mcrypt-*.tgz &> /dev/null && cd mcrypt-*/
else
echo archive is missing
fi
if command -v phpize; then
echo compiling mcrypt module with phpize
phpize &> /dev/null
@kevinski303
kevinski303 / mcrypt_on_php7.3_.txt
Last active March 3, 2021 23:44
php-mcrypt on debian 10 & php 7.3 apache
#
# The php-mcrypt extension is depricated and therefore was removed from the apt repository.
# As of writing this, on php7.3 there is currently no other way to install mcrypt without downgrading the php version
# except for compiling it locally.
#
###
#
# 1; Install the php-dev version and all the used tools to compile the extension