Skip to content

Instantly share code, notes, and snippets.

View richimf's full-sized avatar
:octocat:
Coding...

Ricardo Montesinos richimf

:octocat:
Coding...
View GitHub Profile
@richimf
richimf / The Technical Interview Cheat Sheet.md
Created November 9, 2017 19:09 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@richimf
richimf / speech.swift
Last active November 10, 2021 15:51 — forked from bellbind/speech.swift
[osx][swift]Example of Text-to-Speech as commandline program
// Text-to-Speech on OSX
// run: swift speech.swift "東京特許許可局"
// build: xcrun -sdk macosx swiftc speech.swift && ./speech "東京特許許可局"
//
// for OSX, use NSSpeechSYnthesizer in AppKit,
// (for iOS, use AVSpeechSynthesizer in AVFoundation)
import Foundation
import AppKit
@richimf
richimf / Zombie_error_Xcode.md
Last active December 3, 2018 21:03
Zombie Error Xcode

Zombie Error Message Xcode

Error message:

Build operation failed without specifying any errors. Individual build tasks may have failed for unknown reasons. 
One possible cause is if there are too many (possibly zombie) processes; in this case, rebooting may fix the problem. 
Some individual build task failures (up to 12) may be listed below.
@richimf
richimf / sample_unitext.swift Sample iOS Unit Tests: Working with a ViewController composed of TableViews
/*****
Sample iOS Unit Tests: Working with a ViewController composed of TableViews
*****/
import XCTest
@testable import YourAppTargetname
class SideMenuViewControllerTest: XCTestCase {
@richimf
richimf / pop.swift
Last active October 2, 2018 01:16
Protocol Oriented Programing [Networking-Error Example]
/****
Protocol Oriented Programing
Networking-Error Example
***/
import Foundation
public protocol NetworkController {
func fetchCurrentWeatherData(city: String,
completionHandler: @escaping (WeatherData?, NetworkControllerError?) -> Void) -> WeatherData?
}
@richimf
richimf / agile.md
Created October 18, 2018 21:17
Agile

Agile

Agile: Son practicas para maximizar el valor del negocio. No necesariamente mas rápido.

Practicas Agile, 40 agile methods Scrum(Scrumbut/Scrumand), Flow, eming, XP, Crystal, DSDM, FDD, ASD, etc...

Escalar, llevar practicas de equipos mas grandes a 9 personas. Tener 8 equipos en un mismo proyecto, como escalarlo, Scrum no te dice como.

@richimf
richimf / mergeunion.md
Last active April 17, 2020 17:30
Avoid merge conflicts into project.pbxproj
  1. Create a .gitattributes file:

Assuming you don’t already have one, create a file called .gitattributes in your project’s root directory.

  1. Set the merge strategy to union:

Add the following line to your .gitattributes file.

This will tell git to merge using the union strategy, meaning it’ll keep both sides (theirs and ours).

@richimf
richimf / sum.swift
Created November 22, 2018 21:49
Sum numbers 1 to n
//You:
func sumFromOne(upto n: Int) -> Int {
var result = 0
for i in 1...n {
result += i
}
return result
}
sumFromOne(upto: 10)
@richimf
richimf / regex.md
Created December 3, 2018 21:02
Regular expresions in swift (notes).

Regular expresions in swift (notes).

Special characters in literal strings, precede them by a backslash \ character.

This means the standard regular expression \. will appear as \\. in Swift code.

Capturing parentheses: are used to group part of a pattern, example 3(pm|am) would match the text 3 pm as well ass 3 am. The pipe character here | acts like an OR operator.

The question mark after capturing parentheses means that whatever is inside the parentheses is optional. Nov(ember)?, input could be Nov or November.

@richimf
richimf / SH_custom_command.md
Last active December 10, 2018 17:24
CopyScripts SH to terminal

Create your SH code:

#!/bin/bash
echo "Stash App Code..."
cd <YOUR_PATH>
branchName=$(git branch | grep \* | cut -d ' ' -f2)
if [[ $branchName != *"fatal"* ]]; then
echo -e "You are on branch: "$branchName
echo "Let's save your work... /o.o/"