Skip to content

Instantly share code, notes, and snippets.

View bemoty's full-sized avatar

Joshua Winkler bemoty

  • Innsbruck, Austria
  • 01:33 (UTC +02:00)
View GitHub Profile
package dev.bemoty.Test;
import java.util.Arrays;
import java.util.stream.IntStream;
public class TennisTournament {
public static void main(String[] args) {
// 32 indices: [0, 31, 15, 16, 8, 23, 9, 24]
// 16 indices: [0, 15, 7, 8]
int[] input16 = IntStream.range(1, 5).toArray();
@bemoty
bemoty / apple-store-notification-bot.js
Created September 20, 2022 11:07
checks the apple store if specific parts are available at a store and notifies you on discord
import { Client, GatewayIntentBits } from "discord.js";
import fetch from "node-fetch";
import process from "process";
const client = new Client({ intents: [GatewayIntentBits.Guilds] });
const DELAY_IN_SECONDS = 60 * 3;
const TARGET_URL = "https://www.apple.com/de/shop/fulfillment-messages";
const locations = [
{

Keybase proof

I hereby claim:

  • I am bemoty on github.
  • I am bemoty_ (https://keybase.io/bemoty_) on keybase.
  • I have a public key whose fingerprint is 3151 98E7 FAF8 F8B5 C424 B5FD 78D7 D488 54FA 7AB0

To claim this, I am signing this object:

/* MIT License
Copyright (c) 2018 Bemoty
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@bemoty
bemoty / diggo.cs
Last active November 1, 2017 14:51
using System;
using System.Drawing;
using System.IO;
using System.Media;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Forms;
namespace DmG_Extreme
{
@bemoty
bemoty / yttmbdl.js
Created September 1, 2016 10:23
YouTube Thumbnail Download-Script
var base = prompt("Bitte gib eine URL zu einem YouTube-Video ein.", "");
if (base.startsWith("https://youtube.com/watch?v") || base.startsWith("http://youtube.com/watch?v") || base.startsWith("youtube.com/watch?v") || base.startsWith("www.youtube.com/watch?v") || base.startsWith("http://www.youtube.com/watch?v") || base.startsWith("https://www.youtube.com/watch?v")) {
try {
if (base.indexOf("&") != -1) {
var temp = base.split("&");
var base = temp[0];
}
var splitstring = base.split("=");
var newstring = "https://i.ytimg.com/vi/" + splitstring[1] + "/maxresdefault.jpg";
var clipboard = prompt("Drücke STRG und C auf deiner Tastatur um die URL zum Thumbnail zu kopieren.", newstring);
@bemoty
bemoty / wa_spam.js
Last active December 26, 2016 11:13
var message = prompt("Enter a message to spam.");
var usernumber = prompt("Enter how often the message will be sent.");
if (message != null && usernumber != null) {
var field = document.getElementsByClassName("input")[1];
counter = 0;
function dispatch(target, eventType, char) {
var event = document.createEvent("TextEvent");
event.initTextEvent (eventType, true, true, window, char, 0, "en-US");
target.focus();
target.dispatchEvent(event);