Skip to content

Instantly share code, notes, and snippets.

View fedikhatib's full-sized avatar

fedix fedikhatib

  • earth
View GitHub Profile
@fedikhatib
fedikhatib / mergerefs.jsx
Created April 8, 2024 01:28 — forked from cassidoo/mergerefs.jsx
Merge refs in React so a component can have more than one ref
export function mergeRefs(refs) {
return (value) => {
refs.forEach((ref) => {
if (typeof ref === "function") {
ref(value);
} else if (ref != null) {
ref.current = value;
}
});
};
@fedikhatib
fedikhatib / index.html
Created March 24, 2024 21:19 — forked from xav76/index.html
A CodePen by Mario Gonzalez. Canvas PS3 homescreen wave
<div id="container">
@fedikhatib
fedikhatib / index.html
Created March 24, 2024 21:18
Interactive SVG Workspace from Paris
<div class="bike">
<div class="bike bike__left">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="320" height="180.1px" viewbox="0 0 320 180.1" style="enable-background:new 0 0 320 180.1;" xml:space="preserve">
<style type="text/css">
<![CDATA[
.st0-bike{fill:#142020;}
.st1-bike{fill:#191919;}
.st2-bike{fill:#B6B3B3;}
.st4-bike{fill:#FFFFFF;}
@fedikhatib
fedikhatib / index.html
Last active March 18, 2024 00:54
Proximity Glow Cards
<div class="container">
<article>
<div class="glows"></div>
<span class="header">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6">
<path fill-rule="evenodd" d="M17.303 5.197A7.5 7.5 0 006.697 15.803a.75.75 0 01-1.061 1.061A9 9 0 1121 10.5a.75.75 0 01-1.5 0c0-1.92-.732-3.839-2.197-5.303zm-2.121 2.121a4.5 4.5 0 00-6.364 6.364.75.75 0 11-1.06 1.06A6 6 0 1118 10.5a.75.75 0 01-1.5 0c0-1.153-.44-2.303-1.318-3.182zm-3.634 1.314a.75.75 0 01.82.311l5.228 7.917a.75.75 0 01-.777 1.148l-2.097-.43 1.045 3.9a.75.75 0 01-1.45.388l-1.044-3.899-1.601 1.42a.75.75 0 01-1.247-.606l.569-9.47a.75.75 0 01.554-.68z" clip-rule="evenodd" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6">
<path fill-rule="evenodd" d="M17.303 5.197A7.5 7.5 0 006.697 15.803a.75.75 0 01-1.061 1.061A9 9 0 1121 10.5a.75.75 0 01-1.5 0c0-1.92-.732-3.839-2.197-5.303zm-2.121 2.121a4.5
@fedikhatib
fedikhatib / js.js
Created December 6, 2022 22:39
js cheat sheet
/* *******************************************************************************************
* GLOBAL OBJECTS > OBJECT
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object
* ******************************************************************************************* */
// Global object: properties
Object.length // length is a property of a function object, and indicates how many arguments the function expects, i.e. the number of formal parameters. This number does not include the rest parameter. Has a value of 1.
Object.prototype // Represents the Object prototype object and allows to add new properties and methods to all objects of type Object.
// Methods of the Object constructor
Crash file: C:\Users\fedi\AppData\Local\SumatraPDF\crashinfo\sumatrapdfcrash.txt
Exe: C:\Users\fedi\AppData\Local\SumatraPDF\SumatraPDF.exe
BuiltOn: 2020-03-14
Type: dll
Ver: 3.2 64-bit
Git: fc8f35a2d0581735ea361990dc65c674b3cd2dcb (https://github.com/sumatrapdfreader/sumatrapdf/commit/fc8f35a2d0581735ea361990dc65c674b3cd2dcb)
OS: Windows 10 build 19042 64-bit
Number Of Processors: 4
Processor: Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
Physical Memory: 7.88 GB