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

Enterprise

Task Url: https://gitcoin.co/issue/ethhub-io/ethhub/299/3159

What ethereum offers to Enterprises

Ethereum offers tools which empower developers to build collaboratively and confidently. These tools enables businesses to create, test, and deploy enterprise-grade blockchain solutions in a matter of minutes. Some of them are:

@SteveSandersonMS
SteveSandersonMS / blazor-auth.md
Created June 11, 2019 10:49
Blazor authentication and authorization

Authentication and Authorization

Authentication means determining who a particular user is. Authorization means applying rules about what they can do. Blazor contains features for handling both aspects of this.

It worth remembering how the overall goals differ between server-side Blazor and client-side Blazor:

  • Server-side Blazor applications run on the server. As such, correctly-implemented authorization checks are both how you determine which UI options to show (e.g., which menu entries are available to a certain user) and where you actually enforce access rules.
  • Client-side Blazor applications run on the client. As such, authorization is only used as a way of determining what UI options to show (e.g., which menu entries). The actual enforcement of authorization rules must be implemented on whatever backend server your application operates on, since any client-side checks can be modified or bypassed.

Authentication-enabled templates for Server-Side Blazor

@uzbekdev1
uzbekdev1 / countdown
Created May 9, 2019 20:14
countdown
<!DOCTYPE HTML>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
p {
text-align: center;
font-size: 60px;
margin-top: 0px;
}
# Method: POST
# Headers
# Authorization Bearer eyJhbGciO... (access token)
# Content-Type: application/json
# Body
# {
# "username": "test-user",
# "groups": ["Comp1"], // doesn't work, even if it is in the docs
# "lastName": "test",
@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 April 7, 2026 15:57
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;">
    ...
@m24te28
m24te28 / Dockerfile
Created February 23, 2019 06:52
Dockerfile for nginx on ubuntu
FROM ubuntu:18.04
LABEL maintainer="m24te28"
RUN apt-get update && \
apt-get install -y -q curl gnupg2
RUN curl http://nginx.org/keys/nginx_signing.key | apt-key add -
RUN apt-get update && \
apt-get install -y -q nginx
@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