Skip to content

Instantly share code, notes, and snippets.

View 5HT2's full-sized avatar
🤍

froggie 5HT2

🤍
View GitHub Profile
@MicaelJarniac
MicaelJarniac / youtubedl.md
Last active October 31, 2020 01:50
youtube-dl Forks and Mirrors
@zeroeightysix
zeroeightysix / BrigadierDsl.kt
Created September 9, 2020 13:48
A small kotlin DSL for brigadier
import com.mojang.brigadier.CommandDispatcher
import com.mojang.brigadier.arguments.*
import com.mojang.brigadier.builder.ArgumentBuilder
import com.mojang.brigadier.builder.LiteralArgumentBuilder
import com.mojang.brigadier.builder.RequiredArgumentBuilder
import com.mojang.brigadier.context.CommandContext
@DslMarker
@Target(AnnotationTarget.TYPE)
annotation class BrigadierDsl
@LambdAurora
LambdAurora / optifine_alternatives_fabric.md
Last active October 1, 2024 15:12
Recommended OptiFine alternatives on Fabric

The list is moving out!

If you share this list, please use this link instead: https://lambdaurora.dev/optifine_alternatives

It may still be only a redirection link, but it will have a better web display of the list soon. And the list being on GitHub/GitHub pages improves load times.

The gist version of this list will stop being updated.

Why?

@andremichelle
andremichelle / shadertoy.kt
Created June 26, 2020 04:26
One file shadertoy shaders to openrndr
import org.openrndr.application
import org.openrndr.draw.*
import org.openrndr.internal.Driver
import org.openrndr.math.Vector2
import org.openrndr.math.Vector3
import java.io.File
class ShaderToy(fsCode: String) {
companion object {
fun fromFile(pathname: String): ShaderToy {
@zbeekman
zbeekman / GH-CF-strict-SSL-w-CDN.md
Last active October 8, 2024 14:08
Setting up GH-pages with custom domain, strict (end-to-end) SSL with CloudFlare DNS & CDN

Custom domains, GH-pages, Cloudflare and strict SSL end-to-end encryption

Why I wrote this

Before Github supported SSL encryption for github pages sites, many people were using CloudFlare (CF) as their DNS provider and CDN proxy. CF allowed users to enable SSL encryption from the CDN end points/proxies to the end user. This was great and it allowed visitors to your website to connect with a secure connection between their browser and the cloudflare CDN box that was serving your content. However, with this setup one (significant) link in the chain remained unencrypted and

@ObserverOfTime
ObserverOfTime / BDLinux.md
Last active November 8, 2024 04:49
Install BetterDiscord on Linux

Install BetterDiscord on Linux

This Gist contains simple instructions on how to install, update, and uninstall BetterDiscord on Linux.

For more thorough documentation, take a look at betterdiscordctl's README.

Do NOT submit issues here as I don't check the comments. You should submit them here instead.

@PrashamTrivedi
PrashamTrivedi / DownloadRequest.kt
Last active May 28, 2024 10:50
Download File with progress indicator, written in Kotlin with Co-routines
suspend fun downloadFile(url: String,
downloadFile: File,
downloadProgressFun: (bytesRead: Long, contentLength: Long, isDone: Boolean) -> Unit) {
async(CommonPool) {
val request = with(Request.Builder()) {
url(url)
}.build()
val client = with(OkHttpClient.Builder()) {
addNetworkInterceptor { chain ->
@roycewilliams
roycewilliams / same-quad-list.txt
Last active May 20, 2024 15:35
same-quad-list.txt: a list of same-quad IPs by owner, with DNS status
#-----------------------------------------------------------------------
# same-quad-list.txt: a list of same-quad IPs by owner w/DNS status
#
# The CIDR network is the largest contiguous/bit-boundary-aligned block
# that is allocated to that entity (actual allocated range may be larger)
# NOTE: some ranges not yet converted to CIDR.
# Updates welcome - leave comment and/or ping [email protected]
#-----------------------------------------------------------------------
# For human efficiency, some records are repeated here as comments.
#
@bkaradzic
bkaradzic / why_i_think_immediate_mode_gui_is_way_to_go_for_gamedev_tools.md
Last active October 30, 2024 03:09
Why I think Immediate Mode GUI is way to go for GameDev tools

Why I think Immediate Mode GUI is way to go for GameDev tools

Prerequisites

Before you continue, if you don't know what IMGUI is don't bother reading this post, just ignore it, don't write anything in comments section, etc. If you're curious about IMGUI see bottom of this post, otherwise continue whatever you were doing, this post it's not for you. Thanks!

If you know what IMGUI is, for context read following presentations and blog posts:

  • Insomniac’s Web Tools Postmortem
@elliotchance
elliotchance / README.md
Last active December 31, 2021 05:17
Kata: Human readable duration format

Your task in order to complete this Kata is to write a function which formats a duration, given as a number of seconds, in a human-friendly way.

The function must accept a non-negative integer. If it is zero, it just returns "now". Otherwise, the duration is expressed as a combination of years, days, hours, minutes and seconds.

It is much easier to understand with an example:

  format_duration(62)    # returns "1 minute and 2 seconds"
  format_duration(3662)  # returns "1 hour, 1 minute and 2 seconds"