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 / 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 April 24, 2024 12:35 — 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 4.x Wish URL Android.md
Last active April 24, 2024 11:25
Get Wish URL in Genshin Impact 4.6 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 4.x Wish URL.md
Last active April 24, 2024 11:53
Get Wish History URL in Genshin Impact 4.6 on PC from cache
#!/usr/bin/env bash
curl -s -S -f -o filename.json "$URL"
# -s keeps curl quiet by hiding progress meter and error messages
# -S shows an error message if it fails (stderr)
# -f Fail silently (no output at all) on server errors, keeping stdout clean
# -o specifies an output file
@jogerj
jogerj / hide-promoted-tweets.user.js
Last active July 15, 2022 00:49 — forked from cb372/hide-promoted-tweets.user.js
A simple userscript to hide promoted tweets on twitter.com - Modified for Tampermonkey v4
// ==UserScript==
// @name Hide Promoted Tweets
// @namespace https://github.com/jogerj
// @source https://gist.github.com/jogerj/333221ea0b5e8e09a051c38a09150127
// @version 0.1
// @description Hide promoted tweets on twitter.com
// @author JogerJ
// @author cb372
// @icon https://abs.twimg.com/favicons/favicon.ico
// @grant none