Skip to content

Instantly share code, notes, and snippets.

View tdbe's full-sized avatar

Tudor tdbe

View GitHub Profile
@tdbe
tdbe / Github PR Merge - checks and highlights.js
Last active August 29, 2023 20:27
Quick Greasemonkey/Tampermonkey script for GitHub PRs: disable merge button until certain checks are met. Looks at branch naming pattern, tags, automatic tests. Highlights what it found.
// ==UserScript==
// @name GitHub disable merge button until certain checks are met
// @description Looks at branch naming pattern, tags, automatic tests. Highlights what it found.
// @author github/tdbe
// @version 1
// @match *github.com/*/pull/*
// @run-at document-idle
// @connect github.com
// @connect githubusercontent.com
// @grant GM_notification
@tdbe
tdbe / proper-js-color-conversion-algorithms.html
Last active May 11, 2021 00:41 — forked from mjackson/color-conversion-algorithms.js
rgbToHex, hexToRgb, hslToRgb, rgbToHsl, hslToRgb, rgbToHsv, hsvToRgb, hslToHex, hsvToHex, hexToHsv --- that's right you've finally found complete and proper color conversion algorithms in native JavaScript. Actually works as expected: in: 3 vals in browser format, out: array of 3 vals in browser format. Think of all the druggery I saved you :)
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Color Picker</title>
<meta name="description" content="The HTML5 Herald">
<meta name="author" content="SitePoint">
@tdbe
tdbe / BakeryLightmapManager.cs
Last active August 27, 2022 19:00
A lightmap manager for the Bakery lightmapper from the unity asset store. You can now swap between multiple versions of your lightmaps, and combine different bakes from different lightmap groups.
/// <summary>
/// Author: tudor, https://github.com/tdbe
/// You found this gist at: https://gist.github.com/tdbe/e3c41e6a2dedd88dad907218126a2c39
///
/// This is free and unencumbered software released into the public domain.
//
// Anyone is free to copy, modify, publish, use, compile, sell, or
// distribute this software, either in source code form or as a compiled
// binary, for any purpose, commercial or non-commercial, and by any
// means.
/******************************************************************************
* The MIT License (MIT)
*
* Copyright (c) 2016 Tudor Berechet
* Copyright (c) 2015 Fredrik Lindh
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell