Skip to content

Instantly share code, notes, and snippets.

@hibiyasleep
hibiyasleep / GodDrinksJava.java
Last active May 11, 2024 04:53
world.execute(me);
package goddrinksjava;
/**
* The program GodDrinksJava implements an application that
* creates an empty simulated world with no meaning or purpose.
*
* @author momocashew
* @lyrics hibiyasleep
*/
@mikepruett3
mikepruett3 / shell-setup.ps1
Last active May 11, 2024 04:45
Packages to install via scoop, winget, choco, and other tools...
<#
.SYNOPSIS
Script to Initialize my custom powershell setup.
.DESCRIPTION
Script uses scoop
.NOTES
**NOTE** Will configure the Execution Policy for the "CurrentUser" to Unrestricted.
Author: Mike Pruett
Date: October 18th, 2018
const crypto = require('crypto');
// this usually takes a few seconds
function work(limit = 100000) {
let start = Date.now();
n = 0;
while(n < limit) {
crypto.randomBytes(2048);
n++;
}
#!/usr/bin/awk -f
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff
# My copy here is written in awk instead of C, has no compelling benefit.
# Public domain. @thingskatedid
# Run as awk -v x=xyz ... or env variables for stuff?
# Assumptions: the data is evenly spaced along the x-axis
# TODO: moving average
@amishshah
amishshah / ogg-containers.md
Last active May 11, 2024 04:38
A guide to the Ogg container format for demuxing opus audio

You take a stream/buffer of binary data. The start of your data is a "Page", which has a header followed by data.

Header

You need to read the following data from the header (see https://xiph.org/ogg/doc/framing.html for more detail)

  • capture_pattern - bytes 0 to 3, must read OggS
  • stream_structure_version - byte 4, must be 0
  • header_type_flag - byte 5, a bitflag that tells you metadata about the page (is it a new packet? is a packet continued here? is it the first/last page of the stream?)
  • absolute granule position - bytes 6 to 13, not needed unless you want seeking
  • stream serial number - bytes 14 to 17, a serial number given to each stream contained in the Ogg file. This is important for playing Ogg files that contain other streams, such as video or cover art. You need to identify and only bother parsing the Opus stream.
@zudsniper
zudsniper / PROPOSITIONAL_SYMBOLS_LATEX_OBSIDIAN.md
Created September 28, 2023 22:59
📋 Propositional Logic symbols & their LaTeX formulas specifically for Obsidian flavor Markdown

Certainly! Obsidian is a popular note-taking application that supports Markdown with LaTeX integration for mathematical notation. When using LaTeX in Obsidian's Markdown flavor, you typically enclose the LaTeX code within double dollar signs $$...$$ for block math and single dollar signs $...$ for inline math.

Here's an exhaustive list of the symbols for propositional logic and their formulas specifically formatted for Obsidian flavor Markdown:

  1. Conjunction (AND)

    • Symbol: ∧
    • Obsidian Markdown: $\land$ or $\wedge$
  2. Disjunction (OR)

  • Symbol: ∨

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}
@Klerith
Klerith / flutter-instalaciones.md
Last active May 11, 2024 04:26
Instalaciones del curso de Flutter - Móvil de cero a experto
@pratyakshm
pratyakshm / windowsinstallusingdism.md
Last active May 11, 2024 04:23
Installing Windows 11 on any device using DISM

Install Windows 11 on unsupported devices

Guide to install Windows 11 on any PC (does not involve ISO modifications) This guide will take you through a clean and simple way to install Windows 11 on your device by bypassing all requirements without doing any ISO modifications. Note: Guide shows fresh installation only.

Requirements:

  1. ISO file (Link 1) (Link 2) (22000.65)
  2. Rufus Microsoft Store GitHub Website
  3. USB drive [8GB or more]