Skip to content

Instantly share code, notes, and snippets.

@tkrotoff
tkrotoff / FrontendFrameworksPopularity.md
Last active May 11, 2022
Front-end frameworks popularity (React, Vue, Angular and Svelte)
View FrontendFrameworksPopularity.md

Findings: React is by far the most popular front-end framework/library (and continues to grow faster), except for the GitHub stars. In addition, React is more loved and "wanted" than other front-end frameworks (although it is more used: satisfaction tends to decrease with popularity).

Charts are from different sources and thus colors are inconsistent, please carefully read the chart's legends.

Like this? Check https://gist.github.com/tkrotoff/93f5278a4e8df7e5f6928eff98684979

Stack Overflow trends

https://insights.stackoverflow.com/trends?tags=reactjs%2Cvue.js%2Cangular%2Csvelte%2Cangularjs

@lululau
lululau / emacs-mac-title-bar-7.4.patch
Last active Jan 16, 2020
emacs-mac-title-bar-7.4.patch
View emacs-mac-title-bar-7.4.patch
diff -Nur mituharu-emacs-mac-fd1cf1f3e757/src/macappkit.m 74/src/macappkit.m
--- mituharu-emacs-mac-fd1cf1f3e757/src/macappkit.m 2018-11-16 17:38:56.000000000 +0800
+++ 74/src/macappkit.m 2018-11-17 23:03:48.000000000 +0800
@@ -2098,6 +2098,18 @@
@implementation EmacsWindow
++ (NSButton *)standardWindowButton:(NSWindowButton)b forStyleMask:(NSWindowStyleMask)styleMask
+{
+
@varmais
varmais / thinced.js
Created Oct 1, 2015
Geolocation to Promise wrap example
View thinced.js
var getPosition = function (options) {
return new Promise(function (resolve, reject) {
navigator.geolocation.getCurrentPosition(resolve, reject, options);
});
}
getPosition()
.then((position) => {
console.log(position);
})
@paulirish
paulirish / what-forces-layout.md
Last active May 16, 2022
What forces layout/reflow. The comprehensive list.
View what-forces-layout.md

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
@kmorcinek
kmorcinek / git commands.txt
Last active Jan 2, 2022
Git Commands. My common scenarios for using git.
View git commands.txt
# good git book
http://git-scm.com/book
# Discard uncommitted changes in a specific file
git checkout file_name
# Clear everything not in repo
git checkout -- .
# A way to quickly move to the previous commit in a git branch. This also way for "deleting" last commit.
@gre
gre / easing.js
Last active May 16, 2022
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
View easing.js
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
// no easing, no acceleration
linear: t => t,
// accelerating from zero velocity
easeInQuad: t => t*t,
// decelerating to zero velocity