Skip to content

Instantly share code, notes, and snippets.

View arsenslyusarchuk's full-sized avatar

Arsen Slyusarchuk arsenslyusarchuk

View GitHub Profile
{"messages": [{"role": "system", "content": "You are a Q&A AI assistant."}, {"role": "user", "content": "Who helps Mia find her way through the enchanted forests in 'The Starry Night Adventures'?"}, {"role": "assistant", "content": "Mia is helped by her two companions, Oliver the talking owl and Cometina, a playful comet, as she navigates the enchanted forests in 'The Starry Night Adventures.'"}]}
{"messages": [{"role": "system", "content": "You are a Q&A AI assistant."}, {"role": "user", "content": "What is the name of the boy who discovers the hidden village in 'The Forest of Whispers'?"}, {"role": "assistant", "content": "The boy's name is Finn, and he discovers the hidden village of magical creatures while chasing his kite in 'The Forest of Whispers.'"}]}
{"messages": [{"role": "system", "content": "You are a Q&A AI assistant."}, {"role": "user", "content": "How does the story of 'The Lost Treasure of the Dragon's Cave' emphasize the importance of friendship?"}, {"role": "assistant", "content": "In 'The L
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script type="text/javascript">
(async () => {
const fakePromisesArray = [
() => new Promise((resolve, reject) => {
console.log('promise fired 1')
resolve(1)
}),
() => new Promise((resolve, reject) => {
console.log('promise fired 3')
setTimeout(() => {
const users = [
{name: "Johh", age: 20, gender: “male"},
{name: "Caren", age: 50, , gender: “female},
{name: "Bob", age: 20, , gender: “male},
{name: "Richard", age: 65, , gender: “male},
{name: "Nicole", age: 20, , gender: “female},
{name: "Iliia", age: 65, , gender: “male},
]
// {
// ......
filter$ = {
authorIds: [],
tags: [],
startAt: null,
endAt: null
};
ngOnInit() {
import React, { Component } from 'react';
//// Test pdf.js library
import pdfjsLib from 'pdfjs-dist';
// Setting worker path to worker bundle.
pdfjsLib.GlobalWorkerOptions.workerSrc = 'pdf.worker.bundle.js';
////
class PdfJsComponent extends Component {
previewPdf = (e) => {
const file = e.target.files[0];
/* global beforeEach */
import expect, { createSpy } from 'expect';
import configureMockStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import fetchMock from 'fetch-mock';
import config from 'baseConfig';
import tokenService from 'services/tokenService';
import * as types from '../constants';
import { authenticateUser, userLogout } from '../actions';
@arsenslyusarchuk
arsenslyusarchuk / webpack.common.js
Created October 4, 2018 10:15
webpack.common.js for Windows
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const GitRevisionPlugin = require('git-revision-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const BabelEnginePlugin = require('babel-engine-plugin');
const path = require('path');
const proxy_endpoint = process.env.DEV_PROXY_ENDPOINT || 'http://portal.issa.link';
const port = process.env.DEV_PORT || '8080';
const host = process.env.DEV_HOST || '127.0.0.1';
\bibitem{KlemLavrBook}
Kleman~M., Lavrentovich~O.D., Soft Matter Physics: An Introduction, Springer, New York, 2003; \\ \doi{10.1007/b97416}.
\bibitem{LC_elast}
{Warner~M., Terentjev~E.M., Liquid Crystal Elastomers, Oxford University Press, Oxford, 2007.
\bibitem{LC_elast.2}
Behl~M., Lendlein~A., Mater. Today, 2007, \textbf{10}, 20; \doi{10.1016/S1369-7021(07)70047-0}.}
\bibitem{LC_dendr}
@arsenslyusarchuk
arsenslyusarchuk / package.json
Created December 26, 2017 12:42
Webpack NPM scripts
"scripts": {
"build": "webpack --config ./config/webpack.config.prod.js --progress --profile --colors",
"build:start": "npm run build && PORT=3000 node ./server.js",
"open:src": "webpack-dev-server --config ./config/webpack.config.dev.js --progress --profile --colors",
"lint": "esw src",
"lint:watch": "npm run lint -- --watch",
"start": "npm-run-all --parallel open:src lint:watch",
"test": "cross-env NODE_ENV=test karma start ./config/karma.conf.js --single-run --reporters coverage,mocha --browsers ChromeHeadless",
"dev": "webpack-dashboard -- webpack-dev-server --config ./config/webpack.config.dev.js"
},