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 / appsettings.json
Last active September 17, 2020 13:49
feature switch
{
//other configs
,
"FeatureManagement": {
"FeatureName": true
}
}
@AvgustPol
AvgustPol / style.css
Created September 4, 2020 14:16
Perfect align element on the center of the screen
#centered {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
@AvgustPol
AvgustPol / EnumExtensions.cs
Last active August 25, 2020 11:21
EnumExtension -> GetDescription()
using System;
using System.ComponentModel;
using System.Globalization;
using System.Linq;
namespace Project.Models.Common
{
public static class EnumExtensions
{
public static string GetDescription<T>(this T e) where T : IConvertible
Get latest TAG for branch
git describe --tags --abbrev=0
Get latest TAG for a given git commit
git describe --exact-match <commit-id>
@AvgustPol
AvgustPol / How to reset origin master to a commit
Created August 20, 2020 17:32
Git, How to reset [ origin master ] branch to a commit XXXXX (e.g. e3f1e37)
git checkout master
git reset --hard e3f1e37
git push --force origin master
@AvgustPol
AvgustPol / post.ps1
Last active August 19, 2020 09:04
HTTP POST Powershell send JSON
$ExampleVariable1 = "..your data here..";
$ExampleVariable2 = "..your data here..";
$ExampleVariableN = "..your data here..";
$url = 'https://..your url here..';
$requestBody = @{
ExampleVariable1 = '$(ExampleVariable1)'
ExampleVariable2 = '$(ExampleVariable2)'
ExampleVariableN = '$(ExampleVariableN)'
@AvgustPol
AvgustPol / gist:b5738d5b646639af92b8d3981ff3c1b2
Created July 14, 2020 09:08
RavenDB 3.5 get index DocsCount without query
return DocumentStore.DatabaseCommands.ForDatabase(((DocumentStore)DocumentStore).DefaultDatabase).GetStatistics().Indexes.Single(x => x.Name == indexName).DocsCount;
@AvgustPol
AvgustPol / game.js
Created January 13, 2020 10:20
Working on birthday gift <3
const cvs = document.getElementById("pug");
const ctx = cvs.getContext("2d");
let frames = 0;
const sprite = new Image();
sprite.src = "img/sprite.png";
@AvgustPol
AvgustPol / rotation.html
Created December 12, 2019 11:26
Rotation animation using pure JS (javascript) and CSS
<!DOCTYPE html>
<html>
<body>
<style>
.rotatable {
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
@AvgustPol
AvgustPol / README.md
Created December 5, 2019 10:26 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store