Skip to content

Instantly share code, notes, and snippets.

View rubenroques's full-sized avatar

Ruben Roques rubenroques

  • Portugal
View GitHub Profile
/// |                    World                 |
/// |------------------------------------------|
/// | Module A | Module B | Module C | Module D|
  1. World is a module
  2. World is aware of all modules.
  3. Modules aren't aware of World.
@cojoj
cojoj / list.md
Last active November 19, 2020 08:04
Number of people working on iOS apps

Purpose of this list is to gather a source of information on how many people are working on iOS application.
I often wonder how many people are behind Facebook's app or Twitter's. If you're as curious as me, please share and please add apps 😉.

* - it's a rumoured value only. Needs confirmation from someone inside the company.

  1. Fishbrain - 3
  2. Artsy - 5
  3. Truecaller - 5
  4. Lifesum - 4 or 5
  5. Spotify - 50*
@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
@rbren
rbren / README.md
Last active July 1, 2021 22:09
Sync GitHub issues to spreadsheet

DataFire Dataflow: Sync GitHub issues to spreadsheet

Deprecated - DataFire is now out of beta. You can use the new version of this project on DataFire.io, or view it on GitHub

Pulls all new issues from a GitHub repo into a spreadsheet

View on DataFire

[metadata]: ./ '{"links":[{"connection":"563b9b84ea9ad5f345e97505","operation":{"method":"get","path":"/repos/{ownerId}/{repoId}/issues"}},{"connection":"563b9b85ea9ad5f345e97511","operation":{"method":"get","path":"/list/{key}/{worksheetId}/{visibility}/{projection}"}},{"connection":"563b9b85ea9ad5f345e97511","operation":{"method":"put","path":"/cells/{key}/{worksheetId}/{visibility}/{projection}/{cellId}"}},{"connection":"563b9b85ea9ad5f345e97511","operation":{"method":"post","path":"/list/{key}/{worksheetId}/{visibility}/{pro

@orta
orta / Podfile.ruby
Created October 22, 2015 07:42
make frameworks the same as your bundle id
post_install do |installer|
app_plist = "Emergence/Info.plist"
plist_buddy = "/usr/libexec/PlistBuddy"
version = `#{plist_buddy} -c "Print CFBundleShortVersionString" #{app_plist}`.split
puts "Updating CocoaPods' version numbers to #{version}"
installer.pods_project.targets.each do |target|
`#{plist_buddy} -c "Set CFBundleShortVersionString #{version}" "Pods/Target Support Files/#{target}/Info.plist"`
end
end
@vlas-voloshin
vlas-voloshin / delete-duplicate-sims.rb
Last active April 18, 2024 19:04
Script for deleting duplicate iOS simulators and fixing simulators list in Xcode
#!/usr/bin/env ruby
# What is this for?
# This script fixes an issue appeared for some Xcode users where it would show long identifiers
# in the list of simulators instead of usual short names. This is caused by duplicate simulators
# being sometimes created after switching between Xcode versions, with the same
# device type + runtime pair occurring more than once in your list of available simulators.
# Instead of showing the same simulator name twice, Xcode defaults to simulator identifiers.
#
# What it does?
@bwhiteley
bwhiteley / gist:049e4bede49e71a6d2e2
Last active March 17, 2024 13:10
Initialize Swift subclass of UIView, designed in .xib
// Create CustomView.xib, set File's Owner to CustomView.
// Link the top level view in the XIB to the contentView outlet.
class CustomView : UIView {
@IBOutlet private var contentView:UIView?
// other outlets
override init(frame: CGRect) { // for using CustomView in code
super.init(frame: frame)
self.commonInit()
@rubenroques
rubenroques / FuzzySearch.swift
Last active April 29, 2018 16:03
Fuzzy String Search in Swift
func fuzzySearch(var originalString: String, var stringToSearch: String, caseSensitive: Bool = false)->Bool {
if countElements(originalString)==0 || countElements(stringToSearch)==0 {
return false
}
if countElements(originalString) < countElements(stringToSearch) {
return false
}
@ryanmaxwell
ryanmaxwell / ryan-objc.cfg
Last active June 26, 2019 16:41
Objective-C Uncrustify Config
#
# Uncrustify Configuration File
# File Created With UncrustifyX 0.2 (140)
#
# Alignment
# ---------
## Alignment