Skip to content

Instantly share code, notes, and snippets.

View sambartik's full-sized avatar
🤗
C# and C++ rocks!

Samuel Bartík sambartik

🤗
C# and C++ rocks!
View GitHub Profile
twitch-videoad.js text/javascript
(function() {
if ( /(^|\.)twitch\.tv$/.test(document.location.hostname) === false ) { return; }
var ourTwitchAdSolutionsVersion = 11;// Used to prevent conflicts with outdated versions of the scripts
if (typeof unsafeWindow === 'undefined') {
unsafeWindow = window;
}
if (typeof unsafeWindow.twitchAdSolutionsVersion !== 'undefined' && unsafeWindow.twitchAdSolutionsVersion >= ourTwitchAdSolutionsVersion) {
console.log("skipping video-swap-new as there's another script active. ourVersion:" + ourTwitchAdSolutionsVersion + " activeVersion:" + unsafeWindow.twitchAdSolutionsVersion);
unsafeWindow.twitchAdSolutionsVersion = ourTwitchAdSolutionsVersion;
twitch-videoad.js text/javascript
(function() {
if ( /(^|\.)twitch\.tv$/.test(document.location.hostname) === false ) { return; }
var ourTwitchAdSolutionsVersion = 9;// Used to prevent conflicts with outdated versions of the scripts
if (typeof unsafeWindow === 'undefined') {
unsafeWindow = window;
}
if (typeof unsafeWindow.twitchAdSolutionsVersion !== 'undefined' && unsafeWindow.twitchAdSolutionsVersion >= ourTwitchAdSolutionsVersion) {
console.log("skipping vaft as there's another script active. ourVersion:" + ourTwitchAdSolutionsVersion + " activeVersion:" + unsafeWindow.twitchAdSolutionsVersion);
unsafeWindow.twitchAdSolutionsVersion = ourTwitchAdSolutionsVersion;
@sambartik
sambartik / homoglyphs-scramblify.js
Last active July 28, 2022 13:03
Swap characters for their homoglyph counterparts! Have fun.
// https://gist.github.com/sambartik/d95177ee9d0996c19fa66358a77423e5
function buildScramblify(map) {
return function (str) {
return (str.split("").map((char) => {
if (char in map) {
const homoglyphsArray = map[char];
const randomIndex = Math.round(Math.random() * (homoglyphsArray.length - 1));
return homoglyphsArray[randomIndex];
@sambartik
sambartik / homoglyph-map.js
Created July 28, 2022 12:40
Javacsript homoglyph map
// Homoglyph map for following characters: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-.
// Source: https://github.com/codebox/homoglyph MIT (as of 28.7.2022)
const homoglyphMap = {
"-": ["\u{06d4}", "\u{2cba}", "\u{fe58}", "\u{02d7}", "\u{2212}", "\u{2796}", "\u{2011}", "\u{2043}", "\u{2012}", "\u{2013}", "\u{2010}"],
".": ["\u{0701}", "\u{0660}", "\u{2024}", "\u{06f0}", "\u{a60e}", "\u{a4f8}", "\u{0702}", "\u{10a50}", "\u{ff0e}", "\u{1d16d}"],
"0": ["\u{1d476}", "\u{0585}", "\u{004f}", "\u{fbaa}", "\u{1d4aa}", "\u{06be}", "\u{1d70e}", "\u{09e6}", "\u{0d02}", "\u{1d4de}", "\u{fee9}", "\u{1d630}", "\u{06c1}", "\u{1ee24}", "\u{1d45c}", "\u{0a66}", "\u{1d7bc}", "\u{0c02}", "\u{10ff}", "\u{1d490}", "\u{1d5c8}", "\u{0d82}", "\u{ff4f}", "\u{1d744}", "\u{0d20}", "\u{1d5fc}", "\u{fba6}", "\u{0c66}", "\u{102ab}", "\u{1d11}", "\u{0665}", "\u{fbab}", "\u{1d6d0}", "\u{1d7b8}", "\u{118c8}", "\u{104c2}", "\u{1d546}", "\u{ff10}", "\u{1d442}", "\u{039f}", "\u{10292}", "\u{1d79e}", "\u{feec}",
@sambartik
sambartik / manifest.json
Last active April 16, 2022 20:34
Temporary InfuseSync repo source
[
{
"guid": "022a3003-993f-45f1-8565-87d12af2e12a",
"name": "InfuseSync",
"description": "This plugin will track all media changes while any Infuse clients are offline to decrease sync times when logging back in to your server.",
"overview": "Blazing fast indexing for Infuse",
"owner": "Firecore LLC",
"imageURL": "https://raw.githubusercontent.com/firecore/InfuseSync/master/InfuseSync/thumb.png",
"category": "General",
"versions": [