Skip to content

Instantly share code, notes, and snippets.

View Serrin's full-sized avatar

Ferenc Czigler Serrin

  • Budapest
View GitHub Profile
// Example POST method implementation:
async function postData(url = '', data = {}) {
// Default options are marked with *
const response = await fetch(url, {
method: 'POST', // *GET, POST, PUT, DELETE, etc.
mode: 'cors', // no-cors, *cors, same-origin
cache: 'no-cache', // *default, no-cache, reload, force-cache, only-if-cached
credentials: 'same-origin', // include, *same-origin, omit
headers: {
@Dakedres
Dakedres / README.md
Last active May 2, 2025 18:29
A Windows 95/98 styled scrollbar for https://windows93.net

Install

Please note, this stylesheet may not work on all browsers, as the CSS scrollbar API is not standardized.

1.1.0

  • Made the checkerboard pattern translucent.
@xCONFLiCTiONx
xCONFLiCTiONx / Markdown.xml
Last active January 25, 2020 14:47
Markdown Language Support for notepad++ (VS2015-Dark)
<NotepadPlus>
<UserLang name="Markdown" ext="md markdown" udlVersion="2.1">
<Settings>
<Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="2" decimalSeparator="0" />
<Prefix Keywords1="yes" Keywords2="yes" Keywords3="yes" Keywords4="yes" Keywords5="yes" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00# 01 02((EOL)) 03&lt;!-- 04--&gt;</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
@maxdenaro
maxdenaro / html
Last active February 24, 2025 05:12
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 May 13, 2025 21:46
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 April 6, 2025 12:22
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);
}