Skip to content

Instantly share code, notes, and snippets.

View ergunkocak's full-sized avatar

Ergün KOÇAK ergunkocak

  • Cologne, Germany
View GitHub Profile
@svpino
svpino / instructions.md
Last active September 12, 2023 03:39
Installing TensorFlow on Apple Silicon
<style name="TopSheet_DialogAnimation">
  <item name="android:windowEnterAnimation">@anim/slide_out_from_top</item>
  <item name="android:windowExitAnimation">@anim/slide_back_to_top</item>
</style>

slide_out_from_top

@BurakDizlek
BurakDizlek / CountryFlags.java
Last active January 17, 2024 01:47
Get to flag unicode as String and use it anywhere.
public class CountryFlags {
private static String A = getEmojiByUnicode(0x1F1E6);
private static String B = getEmojiByUnicode(0x1F1E7);
private static String C = getEmojiByUnicode(0x1F1E8);
private static String D = getEmojiByUnicode(0x1F1E9);
private static String E = getEmojiByUnicode(0x1F1EA);
private static String F = getEmojiByUnicode(0x1F1EB);
private static String G = getEmojiByUnicode(0x1F1EC);
private static String H = getEmojiByUnicode(0x1F1ED);
private static String I = getEmojiByUnicode(0x1F1EE);
@darrarski
darrarski / CodableDecimalSpec.swift
Last active November 26, 2021 14:23
Swift Codable, Decimal <~> String encoding
import Quick
import Nimble
class CodableDecimalSpec: QuickSpec {
override func spec() {
context("encode Model to JSON") {
var model: Model!
var json: [String: String]?
beforeEach {
@nicklockwood
nicklockwood / Withable.swift
Created January 28, 2019 12:06
Withable.swift
/// Withable is a simple protocol to make constructing
/// and modifying objects with multiple properties
/// more pleasant (functional, chainable, point-free)
public protocol Withable {
init()
}
public extension Withable {
/// Construct a new instance, setting an arbitrary subset of properties
init(with config: (inout Self) -> Void) {
@safaorhan
safaorhan / mail-settings.md
Created June 21, 2018 21:47
Yandex pop3 and smtp settings for custom domains

Incoming mail

user name — name@example.com
mail server address — pop.yandex.com
connection security — SSL
port — 995

Outgoing mail

@samskiter
samskiter / iOS11CompatibleLabel.swift
Last active April 1, 2021 15:59
A UILabel subclass that detects and attempts to fix intrinsicContentSize bugs in UILabel on iOS 11
import UIKit
/// A UILabel subclass that detects and attempts to fix intrinsicContentSize bugs in UILabel
class iOS11CompatibleLabel: UILabel {
override var intrinsicContentSize: CGSize {
// First attempt at a fix...
// All UILabels that misbehave have numberOfLines==0 and preferredMaxLayoutWidth=0
// but all UILabels that have these two properties as 0 do not necessarily misbehave
@ryanmeisters
ryanmeisters / XCUIApplication+Scrolling.swift
Created October 26, 2017 00:05
Scrolling helpers automated ui tests using XCUIApplication
extension XCUIApplication {
private struct Constants {
// Half way accross the screen and 10% from top
static let topOffset = CGVector(dx: 0.5, dy: 0.1)
// Half way accross the screen and 90% from top
static let bottomOffset = CGVector(dx: 0.5, dy: 0.9)
}
var screenTopCoordinate: XCUICoordinate {
@joshdholtz
joshdholtz / .env
Last active December 26, 2023 13:31
Using Dotenv and environment variables with fastlane
STUFF = this is some stuff
@ahcode0919
ahcode0919 / Swift-Codable.swift
Created June 6, 2017 22:53
Swift 4 Codable example (Type -> JSON)
//Simple Type - Person
struct Person: Codable {
let name: String
let age: Int
func getString() -> String {
return "Name: \(name), Age: \(age)"
}
}