Skip to content

Instantly share code, notes, and snippets.

View uzbekdev1's full-sized avatar
🌴
On vacation

Elyor Latipov uzbekdev1

🌴
On vacation
View GitHub Profile
@danielhunex
danielhunex / hosted-services-dotnet-core.md
Last active February 21, 2023 20:48
Hosted Services in .Net Core
 
public class HelloContext
{
   private ISomething _smh ; 
     void Foo(string key)
    {
       switch(key)
        {
 case "A":
@jkatz
jkatz / encrypt_password.py
Last active August 23, 2024 15:22
Methods to create password verifiers for PostgreSQL
# Copyright 2019-2022 Jonathan S. Katz
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:

Disable HTML Form Input Autocomplete and Autofill

  1. Add autocomplete="off" onto <form> element;
  2. Add hidden <input> with autocomplete="false" as a first children element of the form.
<form autocomplete="off" method="post" action="">
    <input autocomplete="false" name="hidden" type="text" style="display:none;">
    ...
@thieunguyenhung
thieunguyenhung / 3 Ways_dynamically_form_validation_angular.md
Last active February 19, 2022 12:50
3 Ways to Dynamically Alter your Form Validation in Angular

3 Ways to Dynamically Alter your Form Validation in Angular

Sometimes, we need to add, remove or modify controls in a form in run time. For example, when user click on a check box control then an input apprear example

The basic way

In the class code we just add 3 form controls as normal.

form: FormGroup;

ngOnInit() {
/*
Task Description
interval_map<K,V> is a data structure that efficiently associates intervals of keys of type K with values of type V. Your task is to implement the assign member function of this data structure, which is outlined below.
interval_map<K, V> is implemented on top of std::map. In case you are not entirely sure which functions std::map provides, what they do and which guarantees they provide, we provide an excerpt of the C++ standard here:
Each key-value-pair (k,v) in the std::map means that the value v is associated with the interval from k (including) to the next key (excluding) in the std::map.
Example: the std::map (0,'A'), (3,'B'), (5,'A') represents the mapping
@vlapenkov
vlapenkov / MemoryCacheManager.cs
Created December 21, 2018 12:09
MemoryCacheManager
public class MemoryCacheManager
{
#region Fields
private readonly IMemoryCache _cache;
/// <summary>
/// All keys of cache
/// </summary>
/// <remarks>Dictionary value indicating whether a key still exists in cache</remarks>
import {MatDialogModule} from "@angular/material";
@NgModule({
declarations: [
...
CourseDialogComponent
],
imports: [
...
@diogocapela
diogocapela / moment-js-timezones.txt
Created September 7, 2018 00:10
List of All Moment.js Timezones
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Asmera
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
@uzbekdev1
uzbekdev1 / remove_watermark.py
Created August 25, 2018 09:03 — forked from Arnie97/remove_watermark.py
Removes the annoying watermarks of it-ebooks.info's downloaded eBooks
#!/usr/bin/env python3
import sys
import re
import shutil
import argparse
import binascii
#
# Author: Daxda
@smaglio81
smaglio81 / WebAdmin.Test-WebAppExists.ps1
Created August 18, 2018 22:01
Check if the an application pool exists on a remote server.
<#
.SYNOPSIS
Tests if a web application exists (this can be a site or application).
This was only written to keep naming conventions consistent. This is the same as
Test-Path IIS:\Sites\$SiteName;
.PARAMETER Url
The url of the match on