Skip to content

Instantly share code, notes, and snippets.

@monochromer
monochromer / promise-patterns.js
Last active August 19, 2022 09:56
Паттерны использования promise (Promise Patterns)
/*
conf: Falsy Values 2015
author: Kornel Lesinski
theme: And .then() what? Promise programming patterns
link: https://www.youtube.com/watch?v=KrhQE8K2I7Q
*/
// 1 waterfall. Использование результатов предыдущих промисов
doFirst()
.then(firstResult => {
@d1i1m1o1n
d1i1m1o1n / text
Created October 6, 2016 12:16
How to disable auto-save in phpstorm
How to disable auto-save:
Go to File > Settings (Ctrl+Alt+S).
Go to Appearance & Behavior > System Settings.
Make sure the two are unchecked:
Save files on frame deactivation
Save files automatically if application is idle for x sec.
Go to Editor > General > Editor Tabs
Put a checkmark on "Mark modified files with asterisk"
(Optional but recommended) Under "Tab Closing Policy", select "Close non-modified files first". You may also want to increase the number of allowed tabs.
Click Apply > OK.
@odan
odan / xampp_php7_xdebug.md
Last active April 17, 2024 05:36
Installing Xdebug for XAMPP
$(".data").mask("AB/CD/0000", {
translation:{
A: {pattern: /[0-3]/},
B: {pattern: /[0-9]/},
C: {pattern: /[0-1]/},
D: {pattern: /[0-9]/},
},
onKeyPress: function(a, b, c, d) {
if (!a) return;
var m = a.match(/(\d{2})/g);