Skip to content

Instantly share code, notes, and snippets.

View dbgarcia's full-sized avatar
🏠
Working from home

Douglas Garcia dbgarcia

🏠
Working from home
  • São Paulo, Brasil
View GitHub Profile
pod 'FirebaseCore', '~> 6.0'
pod 'FirebasePerformance', '~> 3.1'
#pod install --repo-update
@dbgarcia
dbgarcia / index.js
Created June 17, 2019 02:49 — forked from graphicbeacon/index.js
How to handle the POST request body without using a framework
const http = require('http');
const { parse } = require('querystring');
const server = http.createServer((req, res) => {
if (req.method === 'POST') {
collectRequestData(req, result => {
console.log(result);
res.end(`Parsed data belonging to ${result.fname}`);
});
}
######################
# Options
######################
REVEAL_ARCHIVE_IN_FINDER=false
@dbgarcia
dbgarcia / podspec-example
Created June 13, 2019 09:40 — forked from atereshkov/podspec-example
Xcode 10 Fat framework - How to create universal binary iOS framework (+ Cocoapods podspec)
If you've got something like this:
file was built for arm64 which is not the architecture being linked (x86_64):
Than this gist is for you.
Let's say you have already developed the framework itself and just want to build the binary
and distribute it through the Cocoapods.
1. Make sure your framework "Deployment Target" is equal to all the dependencies from your podspec file.
@dbgarcia
dbgarcia / AppStoryboard.swift
Created June 8, 2019 13:29 — forked from Gurdeep0602/AppStoryboard.swift
AppStoryboard enumeration
//
// AppStoryboards.swift
// AppStoryboards
//
// Created by Gurdeep on 15/12/16.
// Copyright © 2016 Gurdeep. All rights reserved.
//
import Foundation
import UIKit
# Merge Script
# 1
# Set bash script to exit immediately if any commands fail.
set -e
# 2
# Setup some constants for use later on.
FRAMEWORK_NAME="BrandingFramework"
@dbgarcia
dbgarcia / git-tag-delete-local-and-remote.sh
Created May 31, 2019 13:21 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@dbgarcia
dbgarcia / TransformTransitioning.swift
Created April 25, 2018 23:41 — forked from nRewik/TransformTransitioning.swift
view controller transition from origin view to another view controller.
//: Playground - noun: a place where people can play
import UIKit
import XCPlayground
extension UIView{
var snapshot: UIImage{
UIGraphicsBeginImageContextWithOptions(bounds.size, false, 0);
import UIKit
extension UINavigationController {
func transparentNavBar() {
self.navigationBar.setBackgroundImage(UIImage(), for: .default)
self.navigationBar.shadowImage = UIImage()
self.navigationBar.isTranslucent = true