Skip to content

Instantly share code, notes, and snippets.

View m-etka's full-sized avatar

Etka Özdemir m-etka

  • HerkesePet
  • Antalya, Turkey
View GitHub Profile
@Furkanzmc
Furkanzmc / multi_filename_replace.py
Last active April 20, 2017 11:55
Python Script to Replace the File Names in a Folder
#
# Python Script to Replace the File Names in a Folder
# Changes by @m-etka
#
import os
# Get working directory
path = os.getcwd()
@m-etka
m-etka / threads.swift
Last active July 29, 2016 09:12
Background Threads in Swift
// Special thanks to thatthinginswift.com (https://thatthinginswift.com/background-threads/)
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), {
// do some task
dispatch_async(dispatch_get_main_queue(), {
// update some UI
});
});
@mbigatti
mbigatti / UIView+FirstResponder.swift
Created July 10, 2014 15:40
A classical first responder finder using Swift.
import UIKit
extension UIView {
func currentFirstResponder() -> UIResponder? {
if self.isFirstResponder() {
return self
}
for view in self.subviews {
if let responder = view.currentFirstResponder() {
@sekati
sekati / xcode-build-bump.sh
Created July 24, 2012 20:44
Xcode Auto-increment Build & Version Numbers
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)