Skip to content

Instantly share code, notes, and snippets.

View AvgustPol's full-sized avatar
💪
I am challenging you to follow my code quality standards.

Emily (formerly Anton) Vlasiuk AvgustPol

💪
I am challenging you to follow my code quality standards.
View GitHub Profile
@AvgustPol
AvgustPol / anonymousStyle.tsx
Created November 14, 2019 15:36
[ React ] Anonymous style object in typescript
<div style={{ cursor: 'pointer', fontSize: '1rem' }}>
<p> You are awesome ! </p>
</div>
@AvgustPol
AvgustPol / links.md
Last active December 2, 2020 23:32
JavaScript useful stuff
@AvgustPol
AvgustPol / RazorSnippet.cshtml
Created October 31, 2019 18:29
Unify the pathToImage to be able to use it as "src=" in html/css
@{
string pathToImage;
bool imgFromInternet = Model.ImageUrl.Contains("www.") || Model.ImageUrl.Contains("http");
if (imgFromInternet)
{
pathToImage = $@"{Model.ImageUrl}";
}
else
{
@AvgustPol
AvgustPol / Basic class knowledge.jsx
Last active October 28, 2019 10:19
Improving React basics
class BestComponentEver extends React.Component {
render() { // something like "place for defining view of your component"
return (
<h1> You are awesome today! </h1>
);
}
};
@AvgustPol
AvgustPol / every.js
Last active October 9, 2019 14:15
8 Must Know JavaScript Array Methods
//return true if every item returns true
let items = [
{ name: 'Bike', price: 400 },
{ name: 'TV', price: 1200 }
];
let cheapPrice = 1000;
let everyItemsHasCheapPrice = items.every((item) => {
return item.price <= cheapPrice
@AvgustPol
AvgustPol / Boo.cs
Last active October 1, 2019 09:02
Learning Null Check Operator
public class Boo
{
}
@AvgustPol
AvgustPol / .html
Last active September 23, 2019 14:29
Battle ships layout template - Made with love for the Friendly Ghost ;)
<!DOCTYPE html>
<html>
<head>
<!--bootstrap 4 via link-->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
<body>
<div class="container">
<!-- #region simple template -->
-------------------------------------
[RU:]
-------------------------------------
Размер rem берется от тега html
1rem всегда равен значению, прописаному в html теге .
e.g.
html, body { //главное прописать для html
font-size: 16px;
[RU:] 1em всегда равен размеру шрифта данного блока
[EN:] 1em is always equal to the font size of this block
@AvgustPol
AvgustPol / CSS for image.css
Last active May 28, 2019 08:21
Image Saver ASP.NET CORE + JS image preview
responsive image style
<style>
.imageBox {
max-width: 100%;
height: auto;
}
</style>