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
import 'dart:io'; | |
import 'package:dio/dio.dart'; | |
import '../app_http_client.dart'; | |
import '../app_http_client_token_refresher.dart'; | |
import '../app_http_exception.dart'; | |
import '../http_method.dart'; | |
// TODO Ilya: lock all requests while refreshing token |
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
import os | |
import re | |
# Relatively to "lib" | |
dartIconsPath = 'resources/icons/' | |
iconsDirectory = 'assets/icons/' | |
# Change string to lowerCamelCase | |
def to_camel(word): |
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
class MyClass {} | |
void main() { | |
const className = MyClass; | |
print(className()); | |
} |
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
// Breakpoint viewport sizes and media queries. | |
// | |
// Breakpoints are defined as a map of (name: minimum width), order from small to large: | |
// | |
// (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px) | |
// | |
// The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default. | |
// Name of the next breakpoint, or null for the last breakpoint. | |
// |
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
// at least 100 px are a swipe | |
// you can use the value relative to screen size: window.innerWidth * .1 | |
const offset = 100; | |
let xDown, yDown | |
window.addEventListener('touchstart', e => { | |
const firstTouch = getTouch(e); | |
xDown = firstTouch.clientX; | |
yDown = firstTouch.clientY; |
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
(89.99999999999999 !== 90.00000000000000) !== (89.999999999999999 !== 90.000000000000000) |
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
const { join } = require('path') | |
export function getSrcDir (srcFolder = 'src', startPath = __dirname) { | |
const parentPath = normalize(startPath + '/..') | |
if (startPath === parentPath) { | |
throw Error('Could not find folder.') | |
} | |
if (basename(startPath) === srcFolder) { |
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
{"data": | |
[{"name":"Africa/Conakry","countryCode":"GIN","offset":"(UTC+00:00)","offsetPrefix":"+"},{"name":"Africa/Lome","countryCode":"TGO","offset":"(UTC+00:00)","offsetPrefix":"+"},{"name":"Atlantic/Reykjavik","countryCode":"ISL","offset":"(UTC+00:00)","offsetPrefix":"+"},{"name":"Africa/Monrovia","countryCode":"LBR","offset":"(UTC+00:00)","offsetPrefix":"+"},{"name":"America/Scoresbysund","countryCode":"GRL","offset":"(UTC+00:00)","offsetPrefix":"+"},{"name":"America/Danmarkshavn","countryCode":"GRL","offset":"(UTC+00:00)","offsetPrefix":"+"},{"name":"Africa/Bissau","countryCode":"GNB","offset":"(UTC+00:00)","offsetPrefix":"+"},{"name":"Africa/Banjul","countryCode":"GMB","offset":"(UTC+00:00)","offsetPrefix":"+"},{"name":"Africa/Bamako","countryCode":"MLI","offset":"(UTC+00:00)","offsetPrefix":"+"},{"name":"Africa/Dakar","countryCode":"SEN","offset":"(UTC+00:00)","offsetPrefix":"+"},{"name":"Africa/Ouagadougou","countryCode":"BFA","offset":"(UTC+00:00)","offsetPrefix":"+"},{"name":"Africa/Accra","countryCo |
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
[Environment]::SetEnvironmentVariable("<VARIABLE_NAME>", "<VARIABLE_VALUE>", "User") |
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 getWords (text) { | |
return text.match(/([^\u0000-\u0040\u005B-\u0060\u007B-\u00BF\u02B0-\u036F\u00D7\u00F7\u2000-\u2BFF])+/g) | |
} | |
// Example: | |
// For text: 'Есть button, h1, textarea. Мне нужно: найти самое длинное слово в-textarea! то -- что пишу в ней'.match(...) | |
// Result will be: ["Есть", "button", "h", "textarea", "Мне", "нужно", "найти", "самое", "длинное", "слово", "в", "textarea", "то", "что", "пишу", "в", "ней"] | |
// AUTOR: https://regexr.com/3b0ik |
NewerOlder