Skip to content

Instantly share code, notes, and snippets.

View enesozturk's full-sized avatar

Enes enesozturk

View GitHub Profile
@enesozturk
enesozturk / webpack.config.js
Last active April 18, 2019 09:12
Webpack configuration for Gzip compression
// Webpack version 4^ kullandığınızı varsayıyorum
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const CompressionPlugin = require('compression-webpack-plugin');
module.export = {
...
optimization: {
minimizer: [
new UglifyJSPlugin({
@enesozturk
enesozturk / nginx.conf
Last active April 18, 2019 07:51
Nginx configuration for Gzip files
. . .
##
# `gzip` Settings
gzip on;
gzip_static on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
@enesozturk
enesozturk / IdentityConfig.cs
Last active July 26, 2017 16:01
.NET MVC Identity Send Email via SMTP on Azure Web App
public async Task SendAsync(IdentityMessage message)
{
//Enes Ozturk
SmtpClient smtp = new SmtpClient();
smtp.Port = 587;
smtp.Host = "smtp.gmail.com";
smtp.DeliveryMethod = SmtpDeliveryMethod.Network; //This two lines important for Azure Web Apps.
smtp.UseDefaultCredentials = false; // ----
smtp.Credentials = new System.Net.NetworkCredential("your-email@gmail.com", "password");
smtp.EnableSsl = true;