Skip to content

Instantly share code, notes, and snippets.

View Serrin's full-sized avatar

Ferenc Czigler Serrin

  • The Walt Disney Company
  • Budapest
  • 01:03 (UTC +01:00)
View GitHub Profile
@lakshyaelite
lakshyaelite / markdown-cheatsheet.md
Created August 10, 2025 06:21
The only markdown cheatsheet you'll ever need.

📄 Headings

H1

H2

H3

H4

@i-havr
i-havr / endStringWithThreeDots.js
Created June 9, 2023 10:49
Функція повертає скорочений до заданої кількості символів рядок із трьома крапками у кінці.
const LIMIT = 30;
const endStringWithThreeDots = (str) => {
if (str.length <= LIMIT) {
return str;
} else {
const updatedString = str.slice(0, LIMIT - 3) + "...";
return updatedString;
}
};
@Ormadont
Ormadont / simpleGuid.js
Created March 28, 2022 11:49
simple guid
const newGuid = Date.now().toString(36) + Math.random().toString(36).substring(2);
export default newGuid;
@sergeyzenchenko
sergeyzenchenko / russia-ddos.md
Last active December 22, 2025 06:21
Russia DDOS list
@minhtuanchannhan
minhtuanchannhan / nodejs_cheatsheet.js
Created September 22, 2021 08:03
NodeJS cheatsheet
/**
* @name SYNOPSIS
* @link http://nodejs.org/api/synopsis.html
*/
var http = require('http');
// An example of a web server written with Node which responds with 'Hello World'.
// To run the server, put the code into a file called example.js and execute it with the node program.
http.createServer(function (request, response) {
response.writeHead(200, {'Content-Type': 'text/plain'});
@sn-amil
sn-amil / html-languages.txt
Created July 6, 2021 14:52 — 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)
@berkslv
berkslv / newtonRoot.js
Created January 22, 2021 20:38
Newton method for square root calculation in JavaScript. This code can be improved.
const newtonSquareRoot = (num) => {
let x = 1;
let result;
for (let i = 0; i < 20; i++)
{
result = x - ( x*x - num )/( 2*x );
x = result;
}
@SoftwareDevPro
SoftwareDevPro / php_cheatsheet.md
Created January 20, 2021 18:01
PHP Cheatsheet

PHP Cheatsheet

Including PHP in a file

<?php
    // place PHP code here
?>
$symbols = '!@#$%^&*'.ToCharArray()
$characterList = 'a'..'z' + 'A'..'Z' + '0'..'9' + $symbols
function GeneratePassword {
param(
[Parameter(Mandatory = $false)]
[ValidateRange(12, 256)]
[int]
$length = 14
)
@giuseppe998e
giuseppe998e / fliter.js
Last active March 23, 2021 21:33
5 Lines Iterator JS
// Five Lines Iterator [ fliter (╥﹏╥) ]
const fliter = (a, p = 0) => ({
hasNext: () => p < a.length,
next: () => a[p++],
remove: () => a.splice(--p, 1)
})
/* Minified
* const fliter=(a,p=0)=>({hasNext:()=>p<a.length,next:()=>a[p++],remove:()=>a.splice(--p,1)})
*/