Skip to content

Instantly share code, notes, and snippets.

View Serrin's full-sized avatar

Ferenc Czigler Serrin

  • The Walt Disney Company
  • Budapest
  • 04:55 (UTC +02:00)
View GitHub Profile
@maxdenaro
maxdenaro / html
Last active July 28, 2025 22:35
HTML Email Template
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>HTML Template</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
body {
width: 100% !important;
@StevenACoffman
StevenACoffman / Homoglyphs.md
Last active July 19, 2026 15:19
Unicode Look-alikes

Unicode Character Look-Alikes

Original Letter Look-Alike(s)
a а ạ ą ä à á ą
c с ƈ ċ
d ԁ ɗ
e е ẹ ė é è
g ġ
h һ
const deepCopyFunction = (inObject) => {
let outObject, value, key
if (typeof inObject !== "object" || inObject === null) {
return inObject // Return the value if inObject is not an object
}
// Create an array or object to hold the values
outObject = Array.isArray(inObject) ? [] : {}
export const scrollToElement = (id, position) => {
const element = document.getElementById(id);
if (element) {
element.scrollIntoView({
behavior: 'smooth',
block: position,
});
}
};
@2pai
2pai / statuscode.js
Created June 23, 2019 01:47
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',
@luxplanjay
luxplanjay / visually-hidden.css
Last active June 28, 2026 08:35
Visually hidden CSS pattern
.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
border: 0;
padding: 0;
white-space: nowrap;
clip-path: inset(100%);
@juliarose
juliarose / getUrlParam.js
Created April 4, 2019 13:24
Simple method for getting the value of a URL parameter
/**
* Get a URL parameter
* @param {String} name - Name of parameter
* @returns {(String|null)} The value of parameter, if found
*/
function getUrlParam(name) {
return new URL(location.href).searchParams.get(name);
}
@Gustavo-Kuze
Gustavo-Kuze / force-ctrl-c-v.md
Last active June 8, 2026 17:07
Enable copy and paste in a webpage from the browser console
javascript:(function(){
  allowCopyAndPaste = function(e){
  e.stopImmediatePropagation();
  return true;
  };
  document.addEventListener('copy', allowCopyAndPaste, true);
  document.addEventListener('paste', allowCopyAndPaste, true);
  document.addEventListener('onpaste', allowCopyAndPaste, true);
})(); 
@zed-dz
zed-dz / offline_mdn_docs.md
Created March 12, 2019 14:01
Offline MDN Docs
@jacurtis
jacurtis / no-right-click-on-images.js
Last active November 25, 2019 18:08
Removes right-click on images
/*
* This script will look for all images on a page and prevent right clicking on an image.
*/
const images = document.getElementsByTagName('img');
for(var i = 0; i < images.length; i++) {
images[i].addEventListener('contextmenu', event => event.preventDefault());
}
// Note: I threw this script together as requested by a subscriber. I personally don't recommend doing