- https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-18-04
- https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-2.2
- https://stackoverflow.com/questions/53182688/dotnet-install-sh-not-adding-dotnet-command-on-ubuntu/53183710#comment99116756_53183710
- https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-18-04
- https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-with-http-2-support-on-ubuntu-18-04
- aspnet/Announcements#296
- https://www.lloydkinsella.net/2018/03/12/using-net-core-kestrel-with-nginx-and-unix-sockets/
- https://medium.freecodecamp.org/powerful-ways-to-supercharge-your-nginx-server-and-improve-its-performance-a8afdbfde64d
- https://jcooney.net/post/2016/11/25/nginxstaticfileoffload.html
- https://docs.nginx.com/nginx/admin-guide/web-server/serving-static-content/
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
docker run --name local-postgresql -p 5432:5432 -e POSTGRES_PASSWORD=somePassword -d postgres | |
psql -h localhost -p 5432 dbName -U dbUser -f dumo.sql |
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
# copy bak file to sql container | |
docker cp /path/to/db.bak {container_id}://var/opt/mssql/data |
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
@{ | |
/* Modify the _LayoutTemplate.cshtml, the _Layout.cshtml will be generated by webpack */ | |
} | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<title>TechNews</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> |
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
$databaseDirectory = "C:\dbbackups\" | |
Restore-DbaDatabase -SqlInstance localhost -Path ("{0}{1}" -f $databaseDirectory, "database1.bak") | |
Restore-DbaDatabase -SqlInstance localhost -Path ("{0}{1}" -f $databaseDirectory, "database2.bak") | |
Restore-DbaDatabase -SqlInstance localhost -Path ("{0}{1}" -f $databaseDirectory, "database3.bak") |
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
http://askubuntu.com/questions/756181/installing-php-5-6-on-xenial-16-04 | |
apt-get install php5.6-pgsql | |
install composer | |
composer install |
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
return CreatedAtRoute("DefaultApi", new { id = test.TestId }, test); | |
string url = Url.Link("DefaultApi", new { id = test.TestId }); | |
return Created(url, test); | |
//For Route Attirbutes | |
[Route("api/books/{id}", Name="GetBookById")] | |
public BookDto GetBook(int id) | |
{ | |
// Implementation not shown... |
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
tar -zcvf media.tar.gz media/ | |
as root user | |
pg_dump -h localhost -U Dbuser DbName > /path/fileName.sql | |
from psqlconsle | |
\i E:/file.sql | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO myuser; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- Credits go to: http://codeimpossible.com/2010/11/29/Make-Implement-Interface-use-auto-properties/ --> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>Property Stub</Title> | |
<Description>Snippet for generating property stub</Description> | |
<Author>Microsoft Corporation</Author> | |
<SnippetTypes> | |
<SnippetType>Refactoring</SnippetType> |
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
/(((https?:\/\/+)(?:www\.)[A-Za-z0-9.-]+\.+.{2,4}|(?:^www\.)[A-Za-z0-9.-]+\.+.{2,4})((?:\/[\+~%\/.\w-_]*)?(\?+(?:[-\+=&;%@.\w_]*))?(#+(?:[\w]*))?)?)$/ |
NewerOlder