Skip to content

Instantly share code, notes, and snippets.

@ShiftSad
ShiftSad / DisplayEntityBuilder.kt
Created September 30, 2023 01:11
Utility based on NBTApi, for building DisplayEntity using Kotlin's DSL
@file:Suppress("unused")
package tech.shiftmc.townywars.api
import de.tr7zw.nbtapi.NBT
import net.kyori.adventure.text.Component
import org.bukkit.Location
import org.bukkit.Material
import org.bukkit.entity.Entity
import org.bukkit.entity.EntityType

Overleafのバックアップを自動で取るためのメモ(無料)

How To

  1. Overleafでプロジェクトを立ち上げる.

  2. GitHubで(プライベート)リポジトリを作る

  3. 作ったリポジトリを以下のような構成にする.

@yude
yude / gist:1c168fd468c8e63f5d450871c3324ca8
Last active August 30, 2022 23:54
エゴサーチ用 Twitter 検索クエリー
(yude OR ゆで OR ゆでっち) -"ゆで鮭" -"なゆで" -"ゆで麺" -"ゆでうどん" -"ゆで太郎" -"ゆで汁" -"ゆゆゆで" -"ゆで卵" -"ゆで時間" -"茹でた孫" -"茹卵" filter:follows -"半熟" -"そばゆで" -from:yude_jp -to:yude_jp -from:yudejp -to:yudejp -from:SHIKANBLUSH -to:SHIKANBLUSH -from:yude_RT -to:yude_RT -from:yuderobot -to:yuderobot -from:yude_univ -to:yude_univ
@yude
yude / gist:d934976dd50e77c3e774b1edf3131e1c
Last active August 22, 2020 03:29
tasks.json - Visual Studio Code で C/C++ のコンパイルをいい感じにする
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "C/C++: gcc.exe build active file",
"command": "gcc.exe へのパス",
"args": [
"-g",
"${file}",
@zeffy1014
zeffy1014 / EventHandlerExtention.cs
Created May 4, 2020 15:40
Unity メッセージシステム拡張
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
/*** メッセージシステム受信用のInterface ***/
interface IEventReceiverEx : IEventSystemHandler
{
void OnXxxEvent(); //引数なしIF
void OnXxxIntParamEvent(int value); //int値を渡すIF
@Takhion
Takhion / ConvertJavaFilesToKotlin.kt
Created May 11, 2019 20:06
Convert Java files to Kotlin without the IDE
// adapted from https://github.com/JetBrains/kotlin/blob/0103c0d2fd8c9ae9e7f41898064407a6278c5831/j2k/tests/org/jetbrains/kotlin/j2k/AbstractJavaToKotlinConverterForWebDemoTest.kt
package me.eugeniomarletti
import com.intellij.codeInsight.ContainerProvider
import com.intellij.codeInsight.NullabilityAnnotationInfo
import com.intellij.codeInsight.NullableNotNullManager
import com.intellij.codeInsight.runner.JavaMainMethodProvider
import com.intellij.core.CoreApplicationEnvironment
import com.intellij.core.JavaCoreApplicationEnvironment
@ssig33
ssig33 / 1.md
Last active December 8, 2024 11:02
tweetdeck スクレイピング

Twitter のストリーミング API が滅亡した今、 tweetdeck をスクレイピング(?)するのが一番簡単に twitter の更新情報をリアルタイムに取得する方法だと思います。

ここではその方法を説明します。

1. puppeteer

puppeteer は極めて強力なソフトウェアで、本物の Chrome を使って簡単に Web サイトの操作を自動化したりスクレイピングしたりできます。

今回のような用途で特筆すべき点は、 puppeteer は Web アプリケーションの Ajax リクエストのレスポンスを横取りできる点です。以下に例を示します

Minecraft Launch Intents

Annoyingly, you can't click these links in this gist because github doesnt recognize them as actual valid links. You cant paste it into a browser address bar either, so create a bookmark with the link and then click that!

edu

Opens Minecraft in Edu Mode. This is the real Education Edition!

Link: minecraft:?edu=1

addExternalServer

@graywolf336
graywolf336 / BukkitSerialization.java
Last active February 16, 2025 15:51
Serialize and deserialize the player's inventory, including armor and content.
/**
* Converts the player inventory to a String array of Base64 strings. First string is the content and second string is the armor.
*
* @param playerInventory to turn into an array of strings.
* @return Array of strings: [ main content, armor content ]
* @throws IllegalStateException
*/
public static String[] playerInventoryToBase64(PlayerInventory playerInventory) throws IllegalStateException {
//get the main content part, this doesn't return the armor
String content = toBase64(playerInventory);