Skip to content

Instantly share code, notes, and snippets.

View Yuhtin's full-sized avatar
:octocat:
Focusing

Davi Duarte Yuhtin

:octocat:
Focusing
View GitHub Profile
@Yuhtin
Yuhtin / home.dart
Created May 31, 2021 01:40
Jokenpo system
import 'package:flutter/material.dart';
import 'jokenpo.dart';
import 'jokenpoTypes.dart';
class Homepage extends StatefulWidget {
Homepage({Key key, title: 'Home'}) : super(key: key);
@override
_HomepageState createState() => _HomepageState();
}
@Yuhtin
Yuhtin / conversorProcessor.dart
Created May 31, 2021 00:47
Calculator from Real (BRL) to Euro (EUR) using API
class Conversor {
double value;
double price;
Conversor(double value, double price) {
this.value = value;
this.price = price;
}
double convert() {
@Yuhtin
Yuhtin / TextUtils.java
Created April 18, 2021 14:13
TextComponent with item (Reflection)
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import net.md_5.bungee.api.chat.BaseComponent;
import net.md_5.bungee.api.chat.HoverEvent;
import net.md_5.bungee.api.chat.TextComponent;
import org.bukkit.Bukkit;
import org.bukkit.inventory.ItemStack;
import java.lang.reflect.Method;
import java.util.logging.Level;
@Yuhtin
Yuhtin / CaseInsensitiveExample.java
Last active April 5, 2021 18:44
Case insensitive string as HashMap key
/**
* @author Yuhtin
* Github: https://github.com/Yuhtin
*/
public class CaseInsensitiveExample {
static final CaseInsensitiveLinkedMap<Character> CHARACTER_MAP = CaseInsensitiveLinkedMap.newMap();
public static void main(String[] args) {
@Yuhtin
Yuhtin / DnsResolver.js
Last active January 25, 2021 19:53
Resolve DNS
const dns = require('dns');
const axios = require('axios');
const api = axios.create({ baseURL: 'http://ip-api.com' });
const dnsIp = 'netflix.com',
resetColor = '',
bold = '',
backgroundColor = '',
pinkColor = '',
cyanColor = '',
prefix = resetColor + '[' + cyanColor + '+' + resetColor + '] ' + cyanColor + bold + backgroundColor;
@Yuhtin
Yuhtin / ItemBuilder.java
Last active January 11, 2022 20:41
Parse ConfigurationSection as ItemStack
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import org.bukkit.Color;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.inventory.meta.LeatherArmorMeta;
import org.bukkit.inventory.meta.SkullMeta;
import java.lang.reflect.Field;