This file contains hidden or 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 TELEGRAM_BOT_TOKEN = '110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw'; // https://core.telegram.org/bots#creating-a-new-bot | |
| export const verifyTelegramWebAppData = async (telegramInitData: string): boolean => { | |
| // The data is a query string, which is composed of a series of field-value pairs. | |
| const encoded = decodeURIComponent(telegramInitData); | |
| // HMAC-SHA-256 signature of the bot's token with the constant string WebAppData used as a key. | |
| const secret = crypto |
This file contains hidden or 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
| <StackedBarChart | |
| data={{ | |
| labels: ["Test1", "Test2"], | |
| legend: ["L1", "L2", "L3"], | |
| data: [[60, 60, 60], [30, 30, 60]], | |
| barColors: ["#dfe4ea", "#ced6e0", "#a4b0be"] | |
| }} | |
| width={Dimensions.get("window").width - 50} // from react-native | |
| height={220} | |
| yAxisLabel={"Rp"} |
This file contains hidden or 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
| axios({ | |
| url: 'http://localhost:5000/static/example.pdf', | |
| method: 'GET', | |
| responseType: 'blob', // important | |
| }).then((response) => { | |
| const url = window.URL.createObjectURL(new Blob([response.data])); | |
| const link = document.createElement('a'); | |
| link.href = url; | |
| link.setAttribute('download', 'file.pdf'); | |
| document.body.appendChild(link); |
This file contains hidden or 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
| // Определяем зависимости в переменных | |
| var gulp = require('gulp'), | |
| cache = require('gulp-cache'), | |
| clean = require('gulp-clean'), | |
| stream = require('event-stream'), | |
| size = require('gulp-size'), | |
| jshint = require('gulp-jshint'), | |
| concat = require('gulp-concat'), | |
| uglify = require('gulp-uglify'), | |
| minifyCSS = require('gulp-minify-css'), |