Skip to content

Instantly share code, notes, and snippets.

View jogerj's full-sized avatar
🟢
Online

Jonathan Joewono jogerj

🟢
Online
View GitHub Profile
@jogerj
jogerj / fix-paimon-moe.user.js
Last active September 23, 2024 10:24
Runtime patches for paimon.moe
// ==UserScript==
// @name fix-paimon-moe
// @namespace https://jogerj.com
// @version 0.2.1
// @description Fixes for paimon.moe!
// @author JogerJ
// @match https://paimon.moe/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=paimon.moe
// @downloadUrl https://gist.github.com/jogerj/985b6d3112f96027eee599f91f87a211/raw/fix-paimon-moe.user.js
// @run-at document-start
@jogerj
jogerj / paimon-moe-fix-wish-import.user.js
Last active July 30, 2024 09:17
(DEPRECATED -- No longer needed) Replaces the old hoyoverse API called on paimon.moe with new version
// ==UserScript==
// @name Paimon.moe Wish Import fix
// @namespace https://jogerj.com
// @version 0.3.0
// @description (DEPRECATED) Modify request body to api.paimon.moe/corsproxy on paimon.moe
// @author JogerJ
// @match https://paimon.moe/wish/import*
// @downloadUrl https://gist.github.com/jogerj/5ab40acfb77e0fd3c89de7c798a3b4b8/raw/paimon-moe-fix-wish-import.user.js
// @grant none
// @license MIT
@jogerj
jogerj / add-illegal-windows-filename-check-pre-commit.sh
Created February 15, 2024 14:57
This script adds a pre-commit hook to your Git repository that checks for any filenames that contain characters illegal in Windows. Whenever you attempt to commit changes, this hook will run and prevent commits that include such filenames.
#!/bin/bash
# add-illegal-windows-filename-check-pre-commit.sh: Sets up a pre-commit hook to check for illegal Windows filename characters
# Author: Jonathan Joewono (jogerj)
# Date: 12 Feb 2024
# Version: 0.1.0
# DESCRIPTION:
# This script adds a pre-commit hook to your Git repository that checks for any filenames that contain
# characters illegal in Windows. Whenever you attempt to commit changes, this hook will run and prevent
@jogerj
jogerj / check_nextcloud.sh
Last active May 16, 2023 22:17
Check nextcloud for aliveness using tcp ping with lft, send notification to telegram if it's dead. See https://gist.github.com/jogerj/47eca63335c93b214c9bc72347139756
#!/bin/bash
source /root/telegram.sh
fixes_dir="/root"
check_website="nextcloud.acme.com"
ip_address="$(dig +short @1.1.1.1 $check_website)"
if [ "x$ip_address" == "x" ]; then
@jogerj
jogerj / open-in-txtify.js
Created January 24, 2023 07:49
Save as bookmark and click when the ads/images annoy you. Opens the website you have open on txtify.it
javascript:(function()%7Bwindow.location.href %3D 'https%3A%2F%2Ftxtify.it%2F' %2B window.location.href%7D)()
@jogerj
jogerj / importer.ps1
Last active July 31, 2024 08:23 — forked from MadeBaruna/importer.ps1
Paimon.moe Local Importer (Windows)
Add-Type -AssemblyName System.Web
Write-Host "Paimon.moe Wish Importer" -ForegroundColor Cyan
Write-Host "1. Open Genshin Impact in this PC"
Write-Host "2. Then open the wish history and wait it to load"
Write-Host "3. When you are ready press [ENTER] to continue! (or any key to cancel)"
Write-Host "Waiting..."
$keyInput = [Console]::ReadKey($true).Key
if ($keyInput -ne "13") {
@jogerj
jogerj / telegram-http.sh
Last active October 7, 2022 17:37 — forked from dideler/bot.rb
Send Telegram messages from bash
#!bin/bash
TELEGRAM_BOT_TOKEN="botid:token"
CHAT_ID="1234567890"
send_telegram () {
title="$1"
timestamp="$(date -R)"
msg="$title\n$timestamp\n\n$(echo "$2" | sed -z -e 's|\\|\\\\|g' -e 's|\n|\\n|g' -e 's|\t|\\t|g' -e 's|\"|\\"|g')"
entities="[{\"offset\":0,\"length\":${#title},\"type\":\"bold\"},{\"offset\":$((${#title}+1)),\"length\":${#timestamp},\"type\":\"italic\"}]"
@jogerj
jogerj / download_zextras.sh
Last active September 28, 2022 04:15
Download Zextras open source Zimbra builds according to OS version
#!/usr/bin/env bash
OS="$(cat /etc/os-release)"
if [[ $(echo -e $OS | grep "Ubuntu 18") ]]; then
wget -N download.zextras.com/zcs-9.0.0_OSE_UBUNTU18_latest-zextras.tgz;
elif [[ $(echo -e $OS | grep "Ubuntu 20") ]]; then
wget -N download.zextras.com/zcs-9.0.0_OSE_UBUNTU20_latest-zextras.tgz;
elif [[ $(echo -e $OS | grep -e "Red Hat Enterprise Linux" -e "CentOS") ]]; then
if [[ $(cat /etc/redhat-release | grep "release 7") ]]; then
@jogerj
jogerj / Genshin Impact 5.x Wish URL Android.md
Last active October 13, 2024 09:22
Get Wish URL in Genshin Impact 5.0 on Android using Android Debugging Tools

Usage

These instructions are for users with Genshin Impact installed on Android. For installations on PC, see other guide.

Using Termux on Android

  1. Open and Download Termux (Do not download from Play Store as it is not up-to-date)
    • Android 11 and above: Enable Wireless Debugging on your Android phone.
    • Android 10 or below: You need a PC to enable port 5555, follow these instructions to connect then skip step 5-7.
  2. Open Termux and run pkg update && pkg install android-tools termux-api (if failed, run apt update && apt install android-tools termux-api instead)
  3. Open Settings > System > Developer Options > Wireless Debugging. Open the app switcher then tap and hold the Settings app icon. Select "Split top", then select Termux as the botto
@jogerj
jogerj / Genshin Impact Wish URL.md
Last active September 2, 2024 16:57
Get Wish History URL in Genshin Impact on PC from cache. Moved to https://github.com/jogerj/genshin-wish-url

genshin-wish-url

Further development has been moved to its own repository: https://github.com/jogerj/genshin-wish-url

Usage

  1. Win+R and open powershell (or pwsh if Powershell 6+ installed)
  2. Paste and run following
  • All versions (Global/China)
Set-ExecutionPolicy Bypass -Scope CurrentUser -Force;
iex (irm 'https://github.com/jogerj/genshin-wish-url/raw/main/Get-WishUrl.ps1')