Skip to content

Instantly share code, notes, and snippets.

View enesozturk's full-sized avatar

Enes enesozturk

View GitHub Profile
@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;
@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 / 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 / AndroidManifest.xml
Last active April 26, 2020 03:47
OneSignal setup in React Native for Android
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.appname" xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
@enesozturk
enesozturk / App.js
Last active April 26, 2020 10:04
OneSignal setup
import React from 'react';
import OneSignal from 'react-native-onesignal';
const App = ({User}) => {
const [oneSignalInitialized, setOneSignalInitialized] = useState(false);
const [user, setUser] = useState(null);
const onReceived = notification => {
// Bu fonksiyon uygulamanız ön planda (foreground) çalışıyorken tetiklenir.
};
@enesozturk
enesozturk / build.gradle
Created April 26, 2020 03:46
OneSignal setup
// android/app/build.gradle
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' } // Gradle Plugin Portal
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.1, 0.99.99]'
}
}
@enesozturk
enesozturk / README.md
Created May 28, 2020 13:56
.github/README.md

Enes Öztürk - @enesozturk

Hi! 👋🏽 I am Enes. I am a full stack software developer. 💻 I currently developing web and mobile applications by using React and React Native (Love them). I developed web apps and restfull web services with Django, Node JS and .Net. I always like to give new technologies a try. Writing clean code is one of my priorities.

🚀 I'm also paragliding pilot. I love to fly in different places in my free times.

Get In Touch

@enesozturk
enesozturk / AnimateExample.jsx
Created June 6, 2020 15:23
Gesture Handler + Reanimated Example 1
import React, { Component } from "react";
import { StyleSheet, View } from "react-native";
import { PanGestureHandler, State } from "react-native-gesture-handler";
import Animated from "react-native-reanimated";
import runSpring from "./runSpring";
const {
set,
cond,
eq,
add,
@enesozturk
enesozturk / AnimateExample2.jsx
Created June 6, 2020 15:25
Gesture Handler + Reanimated example
import * as React from "react";
import { StyleSheet, Text, View } from "react-native";
import Animated from "react-native-reanimated";
import BottomSheet from "reanimated-bottom-sheet";
import Lorem from "./Lorem";
const { Value, interpolate } = Animated;
export default class Example extends React.Component {
gestureCallbackNode = new Value(0);
contentPos = this.gestureCallbackNode;
renderHeader = (name) => (
@enesozturk
enesozturk / AnimateExample3.jsx
Created June 6, 2020 15:26
Gesture Handler + Reanimated example
import React, { useState, useRef } from "react";
import {
Text,
View,
StyleSheet,
Button,
Animated,
InteractionManager,
Platform,
} from "react-native";