Skip to content

Instantly share code, notes, and snippets.

@FreyaHolmer
FreyaHolmer / GpuPrinter.cginc
Last active August 11, 2024 21:03
A unity shader .cginc to draw numbers in the fragment shader - see the first comment below for example usage!
///////////////////////////////////////////////////////////////////////////////
// ABOUT: A unity Shader .cginc to draw numbers in the fragment shader
// AUTHOR: Freya Holmér
// LICENSE: Use for whatever, commercial or otherwise!
// Don't hold me liable for issues though
// But pls credit me if it works super well <3
// LIMITATIONS: There's some precision loss beyond 3 decimal places
// CONTRIBUTORS: yes please! if you know a more precise way to get
// decimal digits then pls lemme know!
// GetDecimalSymbolAt() could use some more love/precision
@vicradon
vicradon / adding-stuff-to-path.md
Last active August 11, 2024 21:01
Adding Stuff to Path

Adding Stuff to Path

Welcome to another episode of Linux notes. Today, I'll briefly talk about adding stuff to Path on POSIX[1] systems.

So the PATH is a very long colon delimited string that gets extended whenever you add a new directory to it. It looks something like this:

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/bin:/usr/local/sbin
@vimtaai
vimtaai / markdown-flavors.md
Last active August 11, 2024 21:01
Comparison of features in various Markdown flavors

Comparison of syntax extensions in Markdown flavors

I created a crude comparison of the syntax of the various common Markdown extensions to have a better view on what are the most common extensions and what is the most widely accepted syntax for them. The list of Markdown flavors that I looked at was based on the list found on CommonMark's GitHub Wiki.

Flavor Superscript Subscript Deletion*
Strikethrough
Insertion* Highlight* Footnote Task list Table Abbr Deflist Smart typo TOC Math Math Block Mermaid
GFM
@danieldietrich
danieldietrich / Monad.java
Last active August 11, 2024 20:56
The most sophisticated generic Java type I ever wrote
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;
/**
* The Monad interface.
*
* @param <M> The type of the monad, e.g. {@code class Foo<A> extends Monad<Foo<?>, A, Foo<A>>}.
* @param <A> Component type of {@code M}.
*/
@Hisbarry
Hisbarry / index.html
Created August 11, 2024 20:56
Tab interaction
<ul class="tabs">
<li class="active" data-id="0">Education</li>
<li data-id="1">In-session Training</li>
<li data-id="2">Experience</li>
<li data-id="3">Interview</li>
</ul>
<div class="contents">
<div class="box show" data-content="0">
@SCullman
SCullman / FSharpOptions.fs
Last active August 11, 2024 20:54
PetaPoco and F# Options
namespace PetaPoco.FSharpOptions
open PetaPoco
open System
type OptionConverterAttribute() =
inherit ValueConverterAttribute()
with
override __.ConvertFromDb(value: obj) =
let toOption (v: 'T) =

Direct copy of pre-encoded file:

$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8