Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View nothub's full-sized avatar
💭
̵̨̹̜̹̭̥̘̫̱̭̭̯̣̯̳̝̫̝͔̀̅ͫͫͦ̍̏ͧ̂̅̓ͩ̑̿̇̄͜͟᙭̷̣͙͕͒͒ͪ̓̀̃ͯͬ̿͆̍̿̐͂̎̃̀͢

Florian Hübner nothub

💭
̵̨̹̜̹̭̥̘̫̱̭̭̯̣̯̳̝̫̝͔̀̅ͫͫͦ̍̏ͧ̂̅̓ͩ̑̿̇̄͜͟᙭̷̣͙͕͒͒ͪ̓̀̃ͯͬ̿͆̍̿̐͂̎̃̀͢
View GitHub Profile
package not.hub.discord.utils;
import java.time.Instant;
import java.util.Collection;
import java.util.Set;
import java.util.stream.Collectors;
public class Snowflake implements Comparable<Snowflake> {
private static final long DISCORD_EPOCH = 1420070400000L;
@nothub
nothub / AnsiFormat.java
Last active July 30, 2020 18:35
ANSI Formatting
package not.hub.ansi;
/**
* ANSI formatting codes
* <p>
* SGR
* Code Effect Note
* 0 Reset / Normal All attributes off
* 1 Bold or increased intensity As with faint, the color change is a PC (SCO / CGA) invention.[28][better source needed]
* 2 Faint or decreased intensity aka Dim (with a saturated color). May be implemented as a light font weight like bold.[29]
package not.hub.test;
class UnsoundTypeBreakage<T, U> {
final Constrain<? super T> constrain;
final U u;
UnsoundTypeBreakage(T t) {
u = coerce(t);
constrain = getConstrain();
@nothub
nothub / steam.desktop
Created August 12, 2020 23:35
unfuck steam
/usr/games/steam %U -no-browser -nofriendsui steam://open/minigameslist
@nothub
nothub / UnboxingEquals.java
Last active August 13, 2020 18:35
found somewhere on stackoverflow
package not.hub.test;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
class UnboxingEquals {
@Test
void sanity_check() {
// noinspection NumberEquality,SimplifiableAssertion,SimplifiableAssertion
@nothub
nothub / scrup
Last active June 21, 2021 14:03
poor mans screenshot upload
#!/usr/bin/env bash
set -e
SSH_USER=''
SSH_HOST=''
SSH_PATH='' # relative
BASE_URL='' # http
LOCAL_ARCHIVE_PATH="$HOME/scrup"
#!/bin/bash
set -e
if [ -z "$1" ]; then
echo "please provide dir path containign repos"
exit 1
fi
cd "$1"
@nothub
nothub / replace-audio.sh
Last active September 21, 2020 23:21
ffmpeg
#!/bin/bash
set -e
EXAMPLE_USAGE="$(basename $0) video.mp4 audio.mp3 merged.mp4"
if [ -z "$1" ]; then
echo "please specify input video file"
echo "$EXAMPLE_USAGE"
exit 1
@nothub
nothub / samizdat
Last active October 14, 2020 20:38
samizdat (PoC||GTFO) - for a post "The Lawful Access to Encrypted Data Act" and "EARN IT Bill" future
I write it myself, edit it myself, censor it myself, publish it myself, distribute it myself, and spend time in prison for it myself.
Bukovskiĭ, Vladimir - 1942