Skip to content

Instantly share code, notes, and snippets.

View B4rtware's full-sized avatar
👻
ô.Ó

B4rtware

👻
ô.Ó
View GitHub Profile
@KdotJPG
KdotJPG / OpenSimplex2S.java
Last active June 19, 2024 15:44
Visually isotropic coherent noise algorithm based on alternate constructions of the A* lattice.
/**
* K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex")
*
* More language ports, as well as legacy 2014 OpenSimplex, can be found here:
* https://github.com/KdotJPG/OpenSimplex2
*/
public class OpenSimplex2S {
private static final long PRIME_X = 0x5205402B9270C86FL;
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@wildhart
wildhart / dateProtypes.js
Last active March 21, 2023 02:11
Date prototype functions
Date.prototype.addMins = function(mins) {
var dat = new Date(this.valueOf()); // make a new date coz we can't change the original
dat.setMinutes(dat.getMinutes() + mins*1); // force mins to be integer instead of string
return dat;
};
Date.prototype.addDays = function(days) {
var dat = new Date(this.valueOf()); // make a new date coz we can't change the original
dat.setDate(dat.getDate() + days*1); // force days to be integer instead of string
return dat;
@J-Vernay
J-Vernay / native_build_proposal.md
Last active November 24, 2020 11:43
(DRAFT) <native_build> proposal

(DRAFT) Proposal for <native_build> in C++23

Abstract

This document proposes an extension of the C++ standard library. This is an informal draft for a proposal: its aim is to get feedback from other C++ users and implementers. Basically, this proposal provides a starting point to use C++ as a basis for C++ build systems. For this, it provides the minimal C++ header <native_build> which is implemented by the compiler maintainers. It defines new types (which are basically strong-typed alias of std::filesystem::path), a new templated function build(...) for building the project, and run(...) for running an executable. It has also a permissive requirement: programs using `` are only required to work on the machine

@matkoenig
matkoenig / tatort.js
Last active July 13, 2022 23:49
Scriptable iOS widget that shows title, broadcast time and investigation team of next new Tatort episode
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-blue; icon-glyph: magic;
// Tatort Erstausstrahlung 1.3 | Matthias Konig | 11.06.2021
/*----------------------------------------------------------------------------------------------------------------------
Main
----------------------------------------------------------------------------------------------------------------------*/
var url = "https://www.daserste.de/unterhaltung/krimi/tatort/tatort-filter-naechste-erstausstrahlung-102.html"
var widget = await buildWidget()
@snakecase
snakecase / Beep on replay buffer save.lua
Last active July 1, 2024 22:53 — forked from upgradeQ/beep.lua
OBS Lua: Sound notification on replay buffer save [Windows]
local obs = obslua
local ffi = require("ffi")
local winmm = ffi.load("Winmm")
-- Put a sound of your choosing next to "Beep on replay save.lua" and don't forget to match its name either in code below or rename your file.
PROP_AUDIO_FILEPATH = script_path() .. "sound_npc_scanner_scanner_photo1.wav"
ffi.cdef[[
bool PlaySound(const char *pszSound, void *hmod, uint32_t fdwSound);
]]