- GET Requests
- POST/PUT Requests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CAUTION | |
// - Avoid dynamic factories calls | |
// - Generic factories are not supported in `useModel`and `modelView` components | |
// Usage: | |
// const Root = modelView(factory, () => { ... }) | |
// const model = useModel(factory) | |
// ... const $$instance = invoke(createSome, {someParams}) | |
'use client'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Obviously for educative purposes only. | |
Furthermore, this DOESN'T activate BabelEdit permanently. | |
If you like the software, buy it, the devs deserve it. | |
Since I have no money to buy it, I discovered a workaround for unlimited trials. | |
It's quite a annoying workaround, but ... it works! | |
Firstly go to "c:\windows\system32\drivers\etc\" and open the "hosts" file in Notepad/Notepad++/VSCode/Sublime/Atom/whatever as admin (if you don't open it as admin, it won't let you save it). | |
Add this line at the end of the file: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://stackoverflow.com/questions/7279567/how-do-i-pause-a-window-setinterval-in-javascript | |
function RecurringTimer(callback, delay) { | |
var timerId, start, remaining = delay; | |
this.pause = function() { | |
window.clearTimeout(timerId); | |
remaining -= new Date() - start; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ~/services/axiosClient.js | |
import axios from 'axios'; | |
// If you need transformRequest and/or transformResponse | |
// These default transformers should actually be inside the create function | |
// so they can be overriden but there is an issue why it will not work with axios.create() | |
// Link: https://github.com/axios/axios/issues/430 | |
// | |
// Just make it global especially if you only use your own API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Fireside Chat</title> | |
<link rel="stylesheet" href="/style/style.css"> | |
</head> | |
<body> | |
<h1>Fireside Chat</h1> | |
<div id="app"> | |
<div v-if="state == 0"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add on element with overflow | |
-webkit-mask-image: -webkit-radial-gradient(white, black); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let items = new Intl.PluralRules('ru-RU'); | |
let result,word; | |
for(var i = 0;i<25;i++){ | |
if(items.select(i)=='one'){ | |
word = 'шаурма'; | |
} | |
if(items.select(i)=='few'){ | |
word = 'шаурмы'; | |
} | |
if(items.select(i)=='many'){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@function b() { | |
$selector: str-slice(inspect(&), 2, -2); | |
@each $type in '__', '--' { | |
@if str-index($selector, $type) { | |
$selector: str-slice($selector, 0, str-index($selector, $type) - 1); | |
} | |
} | |
@return $selector; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@function b() { | |
$selector: str-slice(inspect(&), 2, -2); | |
@each $type in '__', '--' { | |
@if str-index($selector, $type) { | |
$selector: str-slice($selector, 0, str-index($selector, $type) - 1); | |
} | |
} | |
@return $selector; | |
} |
NewerOlder