Skip to content

Instantly share code, notes, and snippets.

View Serrin's full-sized avatar

Ferenc Czigler Serrin

  • The Walt Disney Company
  • Budapest
  • 04:38 (UTC +02:00)
View GitHub Profile
@Serrin
Serrin / russia-ddos.md
Created March 8, 2022 11:38 — forked from sergeyzenchenko/russia-ddos.md
Russia DDOS list
@Serrin
Serrin / css_colors.js
Created March 2, 2022 08:40 — forked from bobspace/css_colors.js
All of the CSS Color names as an array in javascript.
// CSS Color Names
// Compiled by @bobspace.
//
// A javascript array containing all of the color names listed in the CSS Spec.
// The full list can be found here: https://www.w3schools.com/cssref/css_colors.asp
// Use it as you please, 'cuz you can't, like, own a color, man.
const CSS_COLOR_NAMES = [
"AliceBlue",
"AntiqueWhite",
@Serrin
Serrin / statuscode.js
Created March 2, 2022 08:39 — forked from 2pai/statuscode.js
Respond Code HTTP
const STATUS_CODES = {
100: 'Continue',
101: 'Switching Protocols',
102: 'Processing', // RFC 2518, obsoleted by RFC 4918
103: 'Early Hints',
200: 'OK',
201: 'Created',
202: 'Accepted',
203: 'Non-Authoritative Information',
204: 'No Content',
@Serrin
Serrin / async-foreach.js
Created February 12, 2022 12:52 — forked from jhwheeler/async-foreach.js
JavaScript: async/await with forEach()
const waitFor = (ms) => new Promise(r => setTimeout(r, ms))
const asyncForEach = (array, callback) => {
for (let index = 0; index < array.length; index++) {
await callback(array[index], index, array)
}
}
const start = async () => {
await asyncForEach([1, 2, 3], async (num) => {
await waitFor(50)
@Serrin
Serrin / yuvrgb.md
Created November 28, 2021 21:13 — forked from yohhoy/yuvrgb.md
RGB <=> YCbCr(YPbPr) color space conversion
Y  = a * R + b * G + c * B
Cb = (B - Y) / d
Cr = (R - Y) / e
BT.601 BT.709 BT.2020
a 0.299 0.2126 0.2627
b 0.587 0.7152 0.6780
@Serrin
Serrin / youtube-hide-videos.js
Last active July 23, 2021 22:29
Youtube hide videos from the subscriptions page (https://www.youtube.com/feed/subscriptions)
[...document.querySelectorAll(".style-scope .ytd-menu-renderer")]
.filter((v) => v.className === "style-scope ytd-menu-renderer")
//.slice(0,50) // change here to hide more videos or comment this line to hide all
.forEach( (v,i,a) => {
console.log((i + 1) + " / " + a.length);
v.click();
//[...document.querySelectorAll(".style-scope .ytd-menu-service-item-renderer")]
//.filter( (v) => v.innerHTML === "Hide" )
// //.forEach((v)=>v.click());
@Serrin
Serrin / html-languages.txt
Created July 6, 2021 14:57 — forked from JamieMason/html-languages.txt
HTML lang attribute / ISO language code reference / Culture names
CULTURE SPEC.CULTURE ENGLISH NAME
--------------------------------------------------------------
Invariant Language (Invariant Country)
af af-ZA Afrikaans
af-ZA af-ZA Afrikaans (South Africa)
ar ar-SA Arabic
ar-AE ar-AE Arabic (U.A.E.)
ar-BH ar-BH Arabic (Bahrain)
ar-DZ ar-DZ Arabic (Algeria)
ar-EG ar-EG Arabic (Egypt)
@Serrin
Serrin / javascript-query-string.js
Created June 7, 2021 11:19 — forked from DavidWells/javascript-query-string.js
JavaScript :: Regex trick: Parse a query string into an object
// http://stevenbenner.com/2010/03/javascript-regex-trick-parse-a-query-string-into-an-object/
// JavaScript regex trick: Parse a query string into an object
var queryString = {};
anchor.href.replace(
new RegExp("([^?=&]+)(=([^&]*))?", "g"),
function($0, $1, $2, $3) { queryString[$1] = $3; }
);
// Usage
@Serrin
Serrin / alias.bat.md
Created March 20, 2021 17:04 — forked from MohannadNaj/alias.bat.md
My windows aliases list.

My windows aliases list.

Installation

1- Attaching Aliases to the native command line:

Steps in this stackoverflow answer.Quoting:

you may make the alias(es) persistent with the following steps,

@Serrin
Serrin / markdown-details-collapsible.md
Created March 9, 2021 18:38 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.

A collapsible section containing markdown

Click to expand!

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets