Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View erdemildiz's full-sized avatar
🏠
Working from home

Erdem ILDIZ erdemildiz

🏠
Working from home
View GitHub Profile
@erdemildiz
erdemildiz / vscode.setting.json
Created November 2, 2017 08:41
VS Code Settings
{
"editor.minimap.enabled": false,
"editor.fontSize": 13,
"git.enableSmartCommit": true,
"emmet.triggerExpansionOnTab": true,
"editor.renderIndentGuides": true,
"editor.tabSize": 2,
"editor.formatOnSave": true,
"beautify.language": {
"js": {
import React from 'react-native'
var {
Image,
Animated,
View
} = React
module.exports = React.createClass({
getInitialState() {
@erdemildiz
erdemildiz / LocalStorage.swift
Created December 7, 2018 20:33 — forked from KalpeshTalkar/LocalStorage.swift
LocalStorage is an abstraction over the UserDefaults. The class is written in Swift 3
// Copyright © 2017 Kalpesh Talkar. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@erdemildiz
erdemildiz / styles.js
Last active February 14, 2019 08:45
Common styles declares for React Native
import ratio from './ratio';
import colors from './colors';
// FontWeight - Bold
const bold = { fontWeight: 'bold' };
// border bottom - 1, color - lightGray
const borderBottomLightGray = { borderBottomWidth: 1, borderColor: colors.lightGray };
// fontSize
const size10 = { fontSize: ratio.fontScale(10) };
const size11 = { fontSize: ratio.fontScale(11) };
const size12 = { fontSize: ratio.fontScale(12) };
@erdemildiz
erdemildiz / dimentions.js
Last active February 14, 2019 08:46
Common dimentions for React Native
// Padding - 15
const padding15 = { padding: 15 };
const paddingTop15 = { padding: 15 };
const paddingRight15 = { paddingRight: 15 };
const paddingBottom15 = { paddingBottom: 15 };
const paddingLeft15 = { paddingLeft: 15 };
const paddingVeritacal15 = { paddingVertical: 15 };
const paddingHorizontal15 = { paddingHorizontal: 15 };
// Margin - 15
const margin15 = { margin: 15 };
@erdemildiz
erdemildiz / build.gradlew
Created July 22, 2019 19:11
React Native Hermes build.gradlew config
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: "com.android.application"
apply plugin: 'io.fabric'
import com.android.build.OutputFile
project.ext.react = [
entryFile: "index.js",
enableHermes: true
@erdemildiz
erdemildiz / keyboardproblem.swift
Last active October 9, 2019 07:32
IOS TextField Keyboard Problem on Swift [Swift 4.2.1]
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillChange(notification:)), name: UIResponder.keyboardWillShowNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillChange(notification:)), name: UIResponder.keyboardWillHideNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillChange(notification:)), name: UIResponder.keyboardWillChangeFrameNotification, object: nil)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
@erdemildiz
erdemildiz / UITableView+Common.swift
Created September 26, 2020 16:11
UITableView+Common
#https://github.com/sgl0v/TMDB/blob/master/TMDB/Sources/Screens/Utils/UITableView%2BCommon.swift
import UIKit
protocol NibProvidable {
static var nibName: String { get }
static var nib: UINib { get }
}
extension NibProvidable {
static var nibName: String {
@erdemildiz
erdemildiz / URLSession POST.swift
Last active September 26, 2020 16:11 — forked from dmathewwws/URLSession POST.swift
URLSession POST request example
private static func createUserEventData(user:SKUser, eventType:SKEventType, sticker:Sticker?) {
// server endpoint
let endpoint = "https://app.stickerkit.io/userEvent/v1/\(user.projectID)"
guard let endpointUrl = URL(string: endpoint) else {
return nil
}
//Make JSON to send to send to server