Skip to content

Instantly share code, notes, and snippets.

View Zeryther's full-sized avatar
🎯

Mehdi Baaboura Zeryther

🎯
View GitHub Profile
@Zeryther
Zeryther / script.js
Created March 29, 2023 15:53
Hide Vonovia from immowelt - Vonovia nicht auf Immowelt anzeigen lassen
// ==UserScript==
// @name Hide Vonovia
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.immowelt.de/liste/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=immowelt.de
// @grant none
// ==/UserScript==
@Zeryther
Zeryther / cmd.sh
Created March 23, 2023 16:21
Quickly test AWS account credentials with Docker
# Enter your Access Key ID and Secret Access Key below to quickly test credentials without having to reconfigure your host machine
docker run --rm -e AWS_ACCESS_KEY_ID=<your_access_key_id> -e AWS_SECRET_ACCESS_KEY=<your_secret_access_key> amazon/aws-cli sts get-caller-identity
@Zeryther
Zeryther / convert.sh
Created September 5, 2022 20:17
Convert all MP4 files to MKV files
for i in **/*.mp4; do
ffmpeg -i "$i" -vcodec copy -acodec copy "${i%.*}.mkv"
rm "$i"
done
@Zeryther
Zeryther / remove.sh
Created July 29, 2022 03:55
Remove GitHub PR review request
# For some reason, you can not remove a review request from a PR on GitHub in the UI
# I just misclicked in a repository and accidentally requested review and was unable to take it back.
# After a Google search, I found out that you can do it with the REST API (if you have the necessary permissions in the repo).
#
# GITHUB_USERNAME = Your GitHub username
# REPO_OWNER = The username of the GitHub user or organization that owns the repository
# REPO_NAME = The name of the target repository
# PULL_REQUEST_ID = The ID of the pull request
# GITHUB_REVIEWER_USERNAME = The GitHub username of the person you requested a review from
#
@Zeryther
Zeryther / nginx.conf
Created March 16, 2022 10:36
Azure App Service nginx default conf
server {
#proxy_cache cache;
#proxy_cache_valid 200 1s;
listen 8080;
listen [::]:8080;
root /home/site/wwwroot;
index index.php index.html index.htm;
server_name example.com www.example.com;
location / {
@Zeryther
Zeryther / JSX.ts
Created January 28, 2022 11:54
JSX without react
class JSXService {
public createElement(tag: string, attrs: any, children: any): HTMLElement {
var element: HTMLElement = document.createElement(tag);
for (let name in attrs) {
if (name && attrs.hasOwnProperty(name)) {
var value: string | null | boolean = attrs[name];
if (value === true) {
element.setAttribute(name, name);
} else if (value !== false && value != null) {
element.setAttribute(name, value.toString());
@Zeryther
Zeryther / services.yaml
Last active January 20, 2022 12:03
Sendinblue PHP API - Symfony Service Configuration
# This service config allows you to use the Sendinblue PHP API through the Symfony service container.
# You can autowire any API from your services and controllers.
#
# How to use:
# Run "composer require sendinblue/api-v3-sdk"
# Define your API key with the env variable "SENDINBLUE_KEY".
# Paste the following into your services.yaml:
services:
# Sendinblue
@Zeryther
Zeryther / find.sh
Created December 23, 2021 02:25
Find the biggest files and directories in the current directory under Linux
# The last number represents the amount of results you will get
du -a . | sort -n -r | head -n 5
@Zeryther
Zeryther / installwp.sh
Created October 11, 2021 19:04
WordPress Installation Script
TARGET_DIR="wordpress"
LANG="de_DE"
wget -O wordpress.zip https://de.wordpress.org/latest-$LANG.zip
unzip wordpress.zip -d $TARGET_DIR
rm wordpress.zip
@Zeryther
Zeryther / open.js
Created October 10, 2021 16:17
Open all website links on gelbseiten.de
document.querySelectorAll(".contains-icon-homepage").forEach(it => it.click());