Skip to content

Instantly share code, notes, and snippets.

View ozgurodabasi's full-sized avatar
:octocat:

Özgür Odabaşı ozgurodabasi

:octocat:
  • istanbul
View GitHub Profile

Keybase proof

I hereby claim:

  • I am ozgurodabasi on github.
  • I am ozgurodabasi (https://keybase.io/ozgurodabasi) on keybase.
  • I have a public key whose fingerprint is B56F D081 03AA 3920 04BF D170 DA30 32D4 22AC D393

To claim this, I am signing this object:

@ozgurodabasi
ozgurodabasi / gist:56319448df6440fe690b
Created July 1, 2015 07:24
make all srt files utf in folder
#!/bin/bash
mkdir ORIGINAL_SUBS;
for i in *srt
do
echo "--" ${i%.srt}
mv "$i" ORIGINAL_SUBS;
iconv -f ISO8859-9 -t UTF-8 "ORIGINAL_SUBS/$i" > "${i%.srt}.srt"
done
import os.log
import Foundation
let oslog = Log()
struct Log {
func info<T>(_ object: T, _ file: String = #file, _ function: String = #function, _ line: Int = #line) {
if AppConfig.loggingEnabled {
let fileName: String = (NSURL(string: file)?.lastPathComponent)!
let infoString: String = " 🚀 -> \(fileName):\(function):[\(line)]: \(object)"
import UIKit
struct ScreenSize {
static let bounds: CGRect = UIScreen.main.bounds
static let width: CGFloat = UIScreen.main.bounds.size.width
static let height: CGFloat = UIScreen.main.bounds.size.height
static let maxLength: CGFloat = max(ScreenSize.width, ScreenSize.height)
static let minLength: CGFloat = min(ScreenSize.width, ScreenSize.height)
}
import UIKit
protocol RouterProtocol: Presentable {
func present(_ module: Presentable?)
func present(_ module: Presentable?, animated: Bool)
func push(_ module: Presentable?)
func push(_ module: Presentable?, transition: UIViewControllerAnimatedTransitioning?)
func push(_ module: Presentable?, transition: UIViewControllerAnimatedTransitioning?, animated: Bool)