Skip to content

Instantly share code, notes, and snippets.

View vialyx's full-sized avatar
🎯
Focusing

Maxim Vialyx vialyx

🎯
Focusing
View GitHub Profile
@hfossli
hfossli / SHA256-Bridging-Header.h
Last active July 28, 2024 09:34
AES 256 in swift 4 with CommonCrypto
#import <CommonCrypto/CommonCrypto.h>
@ksatirli
ksatirli / alternate-bitbucket-pipelines.yml
Last active August 11, 2019 12:29
Bitbucket: push assets to AWS CloudFront
---
pipelines:
cloudfront:
- step:
image: python:3.5.1
script:
- pip install awscli
# set up AWS access credentials incl. region
- export AWS_ACCESS_KEY_ID="${AWS_ACCESS_KEY_ID}"
@philippelatulippe
philippelatulippe / swagger-codegen-swift3.md
Created November 17, 2016 10:06
How to generate Swift 3 client library with swagger-codegen

How to generate Swift 3 code with swagger-codegen

  1. Clone the swagger-codegen repo, checkout the branch "2.3.0"

  2. mvn clean package

  3. Create a shell script to make it easier to run your version of swagger-codegen:

/usr/local/bin/swagger-codegen-2.3.0

@nunogoncalves
nunogoncalves / CreditCardValidation.swift
Last active October 7, 2021 07:51
Credit card validation in Swift 3
import UIKit
import PlaygroundSupport
//http://stackoverflow.com/questions/72768/how-do-you-detect-credit-card-type-based-on-number
enum CreditCardType {
case visa
case visaElectron
case mastercard
@wojteklu
wojteklu / clean_code.md
Last active November 17, 2024 20:34
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@emotality
emotality / duplicate_line_xcode.md
Last active April 6, 2024 04:23
Xcode - Duplicate Line key binding

NOTE (2022-07-09): Xcode finally added this functionality in Xcode 14, please see release notes here:

New Features in Xcode 14 Beta 3
When editing code, the Edit > Duplicate menu item and its corresponding keyboard shortcut now duplicate the selected text — or the line that currently contains the insertion point, if no text is selected. (8614499) (FB5618491)


Xcode line duplicate

Bind keys to duplicate lines in Xcode

@mvarie
mvarie / WhereAmIRunning.swift
Last active September 16, 2020 10:33
Detects whether we're running in a Simulator, TestFlight Beta or App Store build
//
// WhereAmIRunning.swift
// https://gist.github.com/mvarie/63455babc2d0480858da
//
// ### Detects whether we're running in a Simulator, TestFlight Beta or App Store build ###
//
// Based on https://github.com/bitstadium/HockeySDK-iOS/blob/develop/Classes/BITHockeyHelper.m
// Inspired by http://stackoverflow.com/questions/18282326/how-can-i-detect-if-the-currently-running-app-was-installed-from-the-app-store
// Created by marcantonio on 04/11/15.
//
@JaviLorbada
JaviLorbada / FRP iOS Learning resources.md
Last active June 17, 2024 06:08
The best FRP iOS resources.

Videos