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 / ParseRSAKeys.java
Created March 16, 2020 08:12 — forked from destan/ParseRSAKeys.java
Parse RSA public and private key pair from string in Java
import java.io.IOException;
import java.net.URISyntaxException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.PKCS8EncodedKeySpec;
Kotlin 16 hrs 55 mins ████████████████▉░░░░ 80.5%
Other 1 hr 4 mins █░░░░░░░░░░░░░░░░░░░░ 5.1%
JSON 36 mins ▌░░░░░░░░░░░░░░░░░░░░ 2.9%
Markdown 24 mins ▍░░░░░░░░░░░░░░░░░░░░ 1.9%
Groovy 20 mins ▎░░░░░░░░░░░░░░░░░░░░ 1.6%
🌞 Morning 129 commits █████▌░░░░░░░░░░░░░░░ 26.5%
🌆 Daytime 191 commits ████████▏░░░░░░░░░░░░ 39.2%
🌃 Evening 156 commits ██████▋░░░░░░░░░░░░░░ 32.0%
🌙 Night 11 commits ▍░░░░░░░░░░░░░░░░░░░░ 2.3%
@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) {
@itsmefox
itsmefox / gw2-api-response.md
Last active November 25, 2023 11:48
GW2 API Error Codes

400:

{
  "text": "invalid key"
}

400:

{
@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 / 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'
# -----------------------------
// 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 {
#!/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)]
@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.
#