Skip to content

Instantly share code, notes, and snippets.

View gabmarfer's full-sized avatar

Gabriel Martelo gabmarfer

View GitHub Profile
@gabmarfer
gabmarfer / xdebug.md
Last active April 9, 2021 13:40
Install and configure XDebug on MacOS

In Terminal

  1. Execute:

pecl install xdebug

  1. Execute following commands in order to check if it has been installed correctly (info about xdebug should be printed on console):

php -ini | grep xdebug

@gabmarfer
gabmarfer / gist:5acf4bf0289b4e3cbbc439844d61436f
Created March 8, 2021 16:12
Install PHP MongoDB on MacOS M1
1. Install ICU (https://gist.github.com/giniedp/7247700):
Go to http://site.icu-project.org/download/
cd icu/source
chmod +x runConfigureICU configure install-sh
./runConfigureICU MacOSX
make
sudo make install
2. sudo pecl install mongodb

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@gabmarfer
gabmarfer / Common-Currency.json
Created November 27, 2017 13:57 — forked from ksafranski/Common-Currency.json
Common Currency Codes in JSON
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},
//
// RealmSwift+Codable.swift
//
// Created by Michael Gray on 8/16/17.
//
import Foundation
import RealmSwift
// swiftlint:disable line_length identifier_name
@gabmarfer
gabmarfer / map-reduce-filter-flatMap.swift
Created September 29, 2017 15:52 — forked from phynet/map-reduce-filter-flatMap.swift
Examples for flatMap, Map, Reduce, Filter in Swift
//reduce
//Use reduce to combine all items in a collection to create a single new value.
let numbers = [1, 3, 5, 7, 9]
//sum all values from the array (+)
let result = numbers.reduce(0, +)
//sum all values from the array (+) plus one
let result2 = numbers.reduce(1, +)
let result3 = numbers.reduce(1, *)
@gabmarfer
gabmarfer / introrx.md
Created September 27, 2017 18:07 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing