Skip to content

Instantly share code, notes, and snippets.

View itsmefox's full-sized avatar
🦊
If you can be a Fox

itsmefox itsmefox

🦊
If you can be a Fox
View GitHub Profile
@itsmefox
itsmefox / discord_app_protocols.md
Created May 23, 2022 12:52 — forked from ghostrider-05/discord_app_protocols.md
An unofficial list of discord app protocols

Discord app protocols

Home:

  • /: discord://-/
  • friends: discord://-/channels/@me/
  • nitro: discord://-/store

General:

@itsmefox
itsmefox / BasicBotApplication.kt
Last active May 20, 2022 08:52
Creating a Discord Bot with Kotlin - BasicBotApplication - 2
class BasicBotApplication {
companion object {
@JvmStatic
fun main(args: Array<String>) {
val token = ""
//Create a new JDA instance
val jda = JDABuilder.createDefault(token)
.addEventListeners(PingCommand())
.build()
@itsmefox
itsmefox / BasicBotApplication.kt
Last active May 20, 2022 08:35
Creating a Discord Bot with Kotlin - BasicBotApplication - 1
class BasicBotApplication {
companion object {
@JvmStatic
fun main(args: Array<String>) {
val token = ""
//Create a new JDA instance
val jda = JDABuilder.createDefault(token).build()
@itsmefox
itsmefox / .p10k.zsh
Created April 20, 2022 09:15
.p10k.zsh-template
# Generated by Powerlevel10k configuration wizard on 2022-04-20 at 09:14 UTC.
# Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 08860.
# Wizard options: nerdfont-complete + powerline, small icons, unicode, lean, 24h time,
# 2 lines, solid, no frame, lightest-ornaments, sparse, many icons, fluent,
# transient_prompt, instant_prompt=quiet.
# Type `p10k configure` to generate another config.
#
# Config for Powerlevel10k with lean prompt style. Type `p10k configure` to generate
# your own config based on it.
#
#!/usr/bin/env tclsh
# * Variables
set var(user) $env(USER)
set var(path) $env(PWD)
set var(home) $env(HOME)
# * Calculate last login
set lastlog [exec -- lastlog -u $var(user)]
// apply this script into the build.gradle of modules which you have applied protobuf plugin
// also, this can be used to workaround others plugins not supporting macOS M1 soc, e.g. AndResGuard
// to support AndResGuard, append `|| it.name == "AndResGuardLocatorSevenZip"`
// to the configuration matching condition sentence
configurations.matching {
it.name.startsWith("protobufToolsLocator_")
}.configureEach {
withDependencies { deps ->
deps.matching { it instanceof ExternalDependency }.configureEach {
it.artifacts.each {
@itsmefox
itsmefox / aliases.zsh
Last active September 23, 2022 19:34
My aliases.zsh file
setopt rcquotes
# -------------------------------
# 1. ENVIRONMENT CONFIGURATION
# -------------------------------
export DEV_HOME=/
alias wks='cd $DEV_HOME'
# -----------------------------
@itsmefox
itsmefox / .p10k.zsh
Created May 19, 2021 13:13
My ~/.p10k.zsh configuration
# Generated by Powerlevel10k configuration wizard on 2021-04-09 at 14:42 CEST.
# Based on romkatv/powerlevel10k/config/p10k-classic.zsh, checksum 5135.
# Wizard options: nerdfont-complete + powerline, small icons, classic, unicode, dark,
# 24h time, angled separators, slanted heads, slanted tails, 2 lines, solid, no frame,
# sparse, many icons, fluent, instant_prompt=verbose.
# Type `p10k configure` to generate another config.
#
# Config for Powerlevel10k with classic powerline prompt style. Type `p10k configure` to generate
# your own config based on it.
#
@itsmefox
itsmefox / gw2-api-response.md
Last active November 25, 2023 11:48
GW2 API Error Codes

400:

{
  "text": "invalid key"
}

400:

{
@itsmefox
itsmefox / JavaIntToLittleEndianUnsigned
Created November 10, 2020 13:05 — forked from paulononaka/JavaIntToLittleEndianUnsigned
Convert a Int (in Java, big endian signed) to LittleEndian unsigned
private static byte[] intToLittleEndian(long numero) {
ByteBuffer bb = ByteBuffer.allocate(4);
bb.order(ByteOrder.LITTLE_ENDIAN);
bb.putInt((int) numero);
return bb.array();
}
// OR ...
private static byte[] intToLittleEndian(long numero) {