Skip to content

Instantly share code, notes, and snippets.

View chev2's full-sized avatar

Chev chev2

  • California, United States
View GitHub Profile
@chev2
chev2 / redirect_yt_shorts.js
Created May 26, 2022 09:59
A really simple script that just redirects YouTube shorts URLs to the regular YouTube player.
// ==UserScript==
// @name YouTube Shorts Redirect
// @namespace http://tampermonkey.net/
// @version 1.0.0
// @description Redirects YouTube shorts links to the regular youtube video player.
// @author Chev
// @match *://*.youtube.com/shorts/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// @run-at document-start
@chev2
chev2 / chev.bf
Created May 8, 2021 04:33
Prints "Chev" in Brainfuck
++++++++[>++[>++++>++++++>+++++++<<<-]<-]>>+++.>++++++++.---.>++++++.
@chev2
chev2 / facepunchwiki.css
Last active March 21, 2022 20:07
Facepunch Wiki Dark Mode - for wiki.facepunch.com. This is primarily aimed to work with the Garry's Mod wiki, but should also work with the other wikis (Rust / Facepunch.Steamworks)
:root {
--bg-color-primary: #2b2b2b;
--bg-color-secondary: #393939;
--bg-color-tertiary: #444;
--text-color-primary: #fff;
--text-color-secondary: #cecece;
--text-color-code-inline: #e85278;
}
@chev2
chev2 / gmodwiki_old.css
Last active April 2, 2020 06:21
Garry's Mod Wiki Dark Mode (OLD WIKI)
.nextupdate, .internalfunc, .deprecatedfunc, .stubpage, .validatepage, .thumbinner, .rcoptions, .derivedonly, #mw-history-search, fieldset {
background-color: #424242 !important;
}
h1 {
color: #d5d5d5 !important;
font-size: 30px;
text-shadow: 0 0 3px rgba(0, 0, 0, 0);
position: static !important;
}
@chev2
chev2 / colorhex.lua
Last active September 15, 2019 20:53
Converts a hex code (#FFFFFF, #FFF, FFF, #fff, #FFFFFFFF, etc.) into a color (Color(255, 255, 255)). Supports alpha.
function string.ColorHex(hex) --Converts a hex code (#FFF, FFF or #FFFFFF, FFFFFF) into a color (Color(255, 255, 255)). Supports alpha.
local h = string.Split(string.gsub(hex, "#", ""):upper(), "") --FFF, FFFFFF, FFFFFFFF
local c = #h
for i=1, 8-c, 1 do
h[i+c] = "F"
end
if #h != 8 then return nil end
local ct = {["r"] = h[1]..h[2], ["g"] = h[3]..h[4], ["b"] = h[5]..h[6], ["a"] = h[7]..h[8]}
for k, v in pairs(ct) do
ct[k] = tonumber(v, 16)