Skip to content

Instantly share code, notes, and snippets.

View kemalekren's full-sized avatar
👨‍💻
Coding

Esat Kemal Ekren kemalekren

👨‍💻
Coding
View GitHub Profile
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
window = UIWindow()
window?.makeKeyAndVisible()
let rootControoler = ViewController()
window?.rootViewController = rootControoler
return true
}
@kemalekren
kemalekren / .swift
Created April 7, 2018 18:49
App Delegate
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
window = UIWindow()
window?.makeKeyAndVisible()
let rootControoler = ViewController()
window?.rootViewController = rootControoler
return true
}
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
window = UIWindow()
window?.makeKeyAndVisible()
let rootControoler = ViewController()
window?.rootViewController = rootControoler
return true
}
tableView.register(UITableViewCell.self, forCellReuseIdentifier: cellId)
npm install -g firebase-tools
const functions = require('firebase-functions');
const admin = require('firebase-admin');
const nodemailer = require('nodemailer');
const cors = require('cors')({ origin: true });
const functions = require('firebase-functions');
const admin = require('firebase-admin');
const nodemailer = require('nodemailer');
const cors = require('cors')({ origin: true });
const functions = require('firebase-functions');
const admin = require('firebase-admin');
const nodemailer = require('nodemailer');
const cors = require('cors')({ origin: true });
admin.initializeApp();
let transporter = nodemailer.createTransport({
service: 'gmail',
auth: {
user: 'yourGmailAdress',
pass: 'yourGmailPassword'
}
});
exports.sendMail = functions.database.ref('/Reports/{uid}').onCreate((snapshot, context) => {
const val = snapshot.val();
// getting dest email by query string
const mailOptions = {
from: 'Sample Report <report@sample.com>', // You can write any mail Adress you want this doesn't effect anything
to: 'another@sample.com', // This mail adress should be filled with any mail you want to read it
tile: val.title,