This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DateTime.fromISO(creationDate).toUTC().setZone("local", { keepLocalTime: true }).toJSDate() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function toggle(...vals) { | |
| var unset = {}; | |
| var cur = unset; | |
| return function next(){ | |
| // save previous value back at | |
| // the end of the list | |
| if (cur != unset) { | |
| vals.push(cur); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| display: -webkit-box; | |
| -webkit-line-clamp: 3; | |
| -webkit-box-orient: vertical; | |
| overflow: hidden; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| &:-webkit-autofill, | |
| &:-webkit-autofill:hover, | |
| &:-webkit-autofill:focus { | |
| border: 0; | |
| -webkit-text-fill-color: $white; | |
| -webkit-box-shadow: 0 0 0 1000px transparent inset; | |
| transition: background-color 5000s ease-in-out 0s; | |
| background: -webkit-linear-gradient(top, rgba(255, 255, 255, 0) 0%, rgba(0, 174, 255, 0.04) 50%, rgba(255, 255, 255, 0) 51%, rgba(0, 174, 255, 0.03) 100%); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from "react"; | |
| import styles from './styles.module.scss'; | |
| import classNames from "classnames/bind"; | |
| interface Props { | |
| label: string; | |
| inputType?: 'text' | 'number' | 'email'; | |
| className?: string; | |
| isValid?: boolean; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private int GetParamFromUrl(string url) | |
| { | |
| Uri myUri = new Uri(NnmClub + url); | |
| string param = HttpUtility.ParseQueryString(myUri.Query).Get("t"); | |
| return ToInt32(param); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); | |
| private string DecodeText(string text) | |
| { | |
| var encFrom = Encoding.GetEncoding("windows-1251"); | |
| var encTo = Encoding.GetEncoding("utf-8"); | |
| byte[] bytes = encFrom.GetBytes(text); | |
| bytes = Encoding.Convert(encFrom, encTo, bytes); | |
| return encTo.GetString(bytes); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dotnet ef database update 0 | |
| dotnet ef migrations remove |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dotnet tool update --global dotnet-ef |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $env:ConnectionStrings__DefaultConnection = "Host=localhost;Port=5432;Database=linksdb;Username=postgres;Password=admin" | |
| dotnet ef migrations add InitialCreate | |
| dotnet ef database update | |
| dotnet ef migrations add InitialCreate -p LinkShortener.Db -s LinkShortener.API | |
| dotnet ef database update -p LinkShortener.Db -s LinkShortener.API |