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 / remove_recurse_all_bin_and_obj_in_folder.ps1
Created January 11, 2024 15:14
[ .NET CORE ] Remove all cached obj, bin folders
Get-ChildItem .\ -include bin,obj -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
@AvgustPol
AvgustPol / blocks_example.html
Last active August 17, 2021 07:55
BEM blocks
<!-- block "home" -->
<div class="home">
<!-- nested block "title" -->
<div class="title"></div>
<!-- nested block "subtitle" -->
<div class="subtitle"></div>
</div>
@AvgustPol
AvgustPol / inst.html
Created January 8, 2021 12:36
Get instagram profile photo
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
@AvgustPol
AvgustPol / Options.cs
Last active December 23, 2020 11:21
Options
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
private void InitFoo(IConfiguration configuration)
{
var config = configuration.GetSection(FooOptions.Position)
.Get<FooOptions>();
}
@AvgustPol
AvgustPol / Program.cs
Created December 21, 2020 11:11
Generate string list for SQL IN Operator operation
using System;
using System.Collections.Generic;
using System.Linq;
public class Program
{
public static void Main()
{
Console.WriteLine("Generate string list for SQL IN Operator operation");
int listSize = 3;
@AvgustPol
AvgustPol / index.html
Created November 22, 2020 20:23
input
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
function isWordCorrect(word, correctWord ) {
word = word.toLowerCase();
@AvgustPol
AvgustPol / create-new-react-app.md
Last active December 12, 2020 16:30
React app script template

Create new react app with typescript

npx create-react-app app-name --template typescript

More info adding-typescript

Bootstrap

@AvgustPol
AvgustPol / Typescript_cheatsheet.md
Last active December 9, 2020 23:35
Typescript cheatsheet

Check installed Typescript version

tsc -v

Install / update latest Typescript version

npm install -g typescript@latest
@AvgustPol
AvgustPol / errorHandling.ps1
Created November 3, 2020 12:11
the best way to deal with try-catch I`ve found so far
try { ... }
catch {
Write-Host "An error occurred:"
Write-Host $_
}
@AvgustPol
AvgustPol / WebClient_GET<T>.cs
Last active October 26, 2020 10:11
WebClient cheatsheet
public string HttpGet<T>(string url, string publicAccessToken)
{
using (WebClient wc = new WebClient())
{
wc.Headers.Add("Authorization", $"Basic {publicAccessToken}");
string reply = await wc.DownloadStringTaskAsync(url);
var result = JsonConvert.DeserializeObject<T>(reply);
return result;