Skip to content

Instantly share code, notes, and snippets.

View v0lkan's full-sized avatar
🎸
totally rocking it 🚀.

Volkan Özçelik v0lkan

🎸
totally rocking it 🚀.
View GitHub Profile
@v0lkan
v0lkan / index.md
Last active October 24, 2022 01:40
List of my useful gists, because GitHub is terrible at arranging them.

About

This is a collection of recipes that I gather from various sources.

It is NOT a replacement for the official docs. I maintain them at a “best effort” basis.

I also provide links to official references in these recipes whenever applicable.

Enjoy, and may the source be with you 🦄.

@v0lkan
v0lkan / rafraf.js
Last active May 5, 2018 16:03
Double requestAnimatioFrame FTW!
const rafraf = (callback) => {
if (!window.requestAnimationFrame) {return null;}
return window.requestAnimationFrame(() =>
window.requestAnimationFrame(callback)
);
};
@v0lkan
v0lkan / evolution-of-a-fetch.js
Last active February 26, 2018 08:27
The Evolution of a Fetch
// Assume `dispatch` and `fetchFromNetwork` are defined elsewhere.
// ## 1. CPS With Nodebacks
// This is the old-school-style fetch. Mostly here for
// historical reasons.
//
// Yet, contrary to the arguments against using it,
// it‘s not that hard to maintain this code when you are
// careful and know what you are doing.
@v0lkan
v0lkan / docker-i-t-trivia.md
Last active July 25, 2023 04:35
docker run -i -t
docker run -i -t --name nodejs ubuntu:latest /bin/bash

So here, -i stands for interactive mode and -t will allocate a pseudo terminal for us.

Some more trivia about these flags.

@v0lkan
v0lkan / silence.sh
Last active July 20, 2023 12:03
How to Have a Silent and High-Performing Western Digital MyCloud Mirror
#
# Needless to say, I (Volkan Ozcelik) take no responsibility, whatsoever,
# about what will happen to your NAS when you try these.
# When did it to mine, I observed *ENORMOUS* performance gain and a zen-like silence.
#
# +----------------------------------------------------------+
# | WHAT YOU ARE GOING TO DO CAN LIKELY VOID YOUR WARRANTY |
# | SO PROCEED WITH CAUTION |
# +----------------------------------------------------------+
#
@v0lkan
v0lkan / engineer.md
Last active June 7, 2021 07:18
The Evolution of a Software Engineer

This gist outlines the change in the depth and breadth of the tasks and responsibilities of a software engineer as she continuously improves herself.

I created this to supplement a discussion in an internal slack group; then I though the rest of the world might benefit from this too.

Contributions are always welcome.

Junior Engineer

  • Knowledge
@adeekshith
adeekshith / .git-commit-template.txt
Last active February 21, 2024 12:06 — forked from Linell/.git-commit-template.txt
This commit message template helps you write great commit messages and enforce it across teams.
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@paullewis
paullewis / requestIdleCallback.js
Last active February 21, 2024 16:56
Shims rIC in case a browser doesn't support it.
/*!
* Copyright 2015 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@paulirish
paulirish / what-forces-layout.md
Last active March 28, 2024 11:45
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@1Marc
1Marc / workshops-planning.md
Last active January 20, 2023 02:34
Workshop Planning

This gist is no longer in use.